Tag: LetsEncrypt

I got my hands on the LetsEncrypt beta and already testing it out. Incase it wasn’t obvious, if you have sites that are SSL only (I have a few subdomains which do not operate on http/port 80), you will need to set them up. Here is a quick example of how I adjusted my Nginx to only support the LetsEncrypt script, but make sure everyone else is https only.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

server

{

listen80;

listen[::]:80;

server_name sub.domain.com;

location/.well-known/acme-challenge

{

root/srv/sub.domain.com/public_html;

}

location/

{

rewrite^(.*)https://$server_name$1 permanent;

}

}

And if it helps anyone, the relevant portion of the server setup with SSL

Check your listen attributes. I’ve sometimes seen this cause things to not work and other times you need this in order for it to work (with IPv6). Do a configtest to make sure of your changes before restarting nginx.