Created
September 22, 2018 15:38
-
-
Save kerren/34b2eb42a7caf9e6cdf2cfe2f49b8409 to your computer and use it in GitHub Desktop.
The new nginx config for entroinfo.xyz after running certbot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name www.entroinfo.xyz entroinfo.xyz; | |
location / { | |
proxy_pass http://localhost:3000; | |
} | |
listen [::]:443 ssl ipv6only=on; # managed by Certbot | |
listen 443 ssl; # managed by Certbot | |
ssl_certificate /etc/letsencrypt/live/entroinfo.xyz/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/entroinfo.xyz/privkey.pem; # managed by Certbot | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | |
} | |
server { | |
if ($host = www.entroinfo.xyz) { | |
return 301 https://$host$request_uri; | |
} # managed by Certbot | |
if ($host = entroinfo.xyz) { | |
return 301 https://$host$request_uri; | |
} # managed by Certbot | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name www.entroinfo.xyz entroinfo.xyz; | |
return 404; # managed by Certbot | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment