Categories
Servers

.htaccess force SSL

[code]RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L][/code]

From inMotion Hosting

Categories
Servers

Add Lets Encrypt Domain

cd /opt/certbot

./certbot-auto certonly --webroot -w /var/www/html \
-d tutorial.serverops.io \
--non-interactive --agree-tos --email me@example.com
Categories
Servers

Installing SSL on Apache

Generate CSR on your server.  Paste the contents of .csr into Namecheap’s interface.

(The .key file is referenced by Apache later along with the certificate)

[code]
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr[/code]

(use www.mikehealy.com.au as my FQDN)

Create crazy long CNAME in DNS to verify. Seems to replace email validation.

Overwrite certificate files in /root on server with new ones from Comodo. Restart Apache, config can stay the same.