How To Fix Let’s Encrypt Root Certificate Expiration on AWS Linux

Author: , Posted on Thursday, October 7th, 2021 at 10:36:10am

On Sept 30th 2021 Let’s Encrypts previous root certificate DST Root CA X3 (and it’s R3 intermediate) will expire. It has been replaced by their ISRG Root X1 certificate (and replacement R3 intermediate).

The version of the R3 intermediate signing certificate which chains to DST Root CA X3 expired September 29 19:21:40 2021 GMT.
The DST Root CA X3 root certificate expired September 30 14:01:15 2021 GMT.

Then restart your web server (i.e. Apache and php-fpm) as appropriate.

How To Enable WordPress Debug

Author: , Posted on Wednesday, September 22nd, 2021 at 11:34:04am

vi wp-config.php

Add at the bottom:

You can also use this URL in later versions:
/wp-login.php?action=entered_recovery_mode

How To Sync AWS S3 Buckets Using RClone

Author: , Posted on Thursday, September 9th, 2021 at 7:57:25pm

The aws s3 sync command is slow and painful!

I needed a more efficient way to sync to large buckets (prod to dev).

Finally settled on RClone: https://rclone.org/docs/

During rclone config I called remote “s3” ;-}

How To Get A Reverse DNS Lookup On The Command Line

Author: , Posted on Wednesday, September 1st, 2021 at 3:50:30pm

There are three commands in Linux to easily get a reverse DNS lookup with:
dig, host and nslookup.

Here are examples of each:

shell> dig -x 3.214.2.238 +short

shell> dig -x 3.214.2.238

shell> host 3.214.2.238

shell> nslookup 3.214.2.238

How To Load /etc/rc.local At Boot Time

Author: , Posted on Thursday, August 12th, 2021 at 10:27:25am

My /etc/rc.local was not loading at boot time.

rc.local is a symlink to /etc/rc.d/rc.local

lrwxrwxrwx 1 root root 13 Jun 22 2020 rc.local -> rc.d/rc.local

I had to execute the following:

How To Force Postfix To Use Only IPv4

Author: , Posted on Thursday, August 12th, 2021 at 10:25:05am

vi /etc/postfix/main.cf

service postfix restart

How To Copy Key Pairs To Another AWS Region Using The ssh-keygen Command

Author: , Posted on Wednesday, August 4th, 2021 at 2:02:08pm

I wanted to use the same SSH keys for multiple AWS regions. As it turns out, AWS simply stores the public key when you download the private key as a .pem file.

The solution is to simply generate the public key locally from the existing .pem, then import the public key using the same name in a different region.

Step 1: Generate public key from existing private key in .pem format:

Step 2: Import the generated public key into AWS:

Login to the AWS Console and navigate to EC2 -> Key Pairs, then choose Actions -> Import Key Pair in the upper-right corner of the page:

Finally, enter the name for the key pair, and either select the file or paste in the generated public key, then click “Import key pair” at the bottom right:

Reference: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ssh-key-pair-regions/

How To Allow AWS IAM Users EBS Snapshot Create And Delete Access

Author: , Posted on Thursday, July 29th, 2021 at 4:41:34pm

SUMMARY: Needed to create an AWS IAM Policy to allow a user access to create and delete EBS snapshots. This script also needed to be able to list volumes:

How To Fix aws Command Error “You must specify a region”

Author: , Posted on Thursday, July 29th, 2021 at 1:55:51pm

I was getting error “You must specify a region” when running any aws CLI command. The fix:

Using the aws command:

which will automatically add the following to the file ~/.aws/config:

You many simply edit the ~/.aws/config file yourself and append the same thing:

How To Allow IAM Users AWS CDN Read/Write Access For W3 Total Cache

Author: , Posted on Wednesday, July 28th, 2021 at 12:34:08pm

SUMMARY: Needed to create an AWS IAM Policy to allow a user access to two buckets and their associated CDN’s in WordPress W3 Total Cache