Skip to content

Instantly share code, notes, and snippets.

@astrotars
Created September 10, 2018 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astrotars/6c9913f5f0d502dcc3c43982ab2a1423 to your computer and use it in GitHub Desktop.
Save astrotars/6c9913f5f0d502dcc3c43982ab2a1423 to your computer and use it in GitHub Desktop.
server {
root /var/www/Winds;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name nickparsons.io; # managed by Certbot
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/nickparsons.io/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/nickparsons.io/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
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass "http://127.0.0.1:8080";
}
}
server {
if ($host = nickparsons.io) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 ;
listen [::]:80 ;
server_name nickparsons.io;
return 404; # managed by Certbot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment