Let's Encrypt has just released their newest intermediate certificate authority, Let's Encrypt X3 and with that, it's now compatible with Windows XP for users using Chrome and antique Internet Explorer. While I've already been delving into the system, it's now going to be my go-to with that last minor hiccup for users who couldn't/wouldn't update is resolved.

So, install Let's Encrypt:

# cd /usr/src
# git clone https://github.com/letsencrypt/letsencrypt
# cd letsencrypt

My setup currently consists of using nginx to handle the SSL and proxying the connection to the back ends running Apache. So, I add the location block to the server block listening on port 80, to handle the letsencrypt authentication.

	location /.well-known/acme-challenge/ {
                root    /var/www;
                index   index.html;
                try_files $uri $uri/ /index.html?/$request_uri;

After reloading nginx, then I run this fancy one-liner that drops the required files into that folder and generate your new certificate...

# ./letsencrypt-auto certonly --email >youremailaddress< --agree-tos --webroot -w /var/www -d mydomain.com -d www.mydomain.com

And then I can set up my SSL block in my nginx configuration...

server {
	listen 443 ssl;
	server_name mydomain.com www.mydomain.com;
	ssl on;

        ssl_certificate      /etc/letsencrypt/live/mydomain.com/fullchain.pem;
        ssl_certificate_key  /etc/letsencrypt/live/mydomain.com/privkey.pem;
	### Add SSL specific settings here ###
	ssl_protocols        TLSv1 TLSv1.1 TLSv1.2;
	ssl_prefer_server_ciphers on;
	ssl_dhparam ssl/dhparams.pem;

     	keepalive_timeout    60;
	ssl_session_cache    shared:SSL:10m;
     	ssl_session_timeout  10m;

     	location / {
		### force timeouts if one of backend is died ##
        	proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
		### Set headers ####
                proxy_set_header        Accept-Encoding   "";
	        proxy_set_header        Host            $host;
	        proxy_set_header        X-Real-IP       $remote_addr;
	        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
	        proxy_set_header        X-Forwarded-Proto $scheme;
		add_header              Front-End-Https   on;

		### By default we don't want to redirect it ####
	        proxy_redirect     off;

(don't forget to generate your dhparams.pem)

Reload nginx and you're good to go.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>