diff options
Diffstat (limited to 'nginx/http.d/static.conf.template')
| -rw-r--r-- | nginx/http.d/static.conf.template | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nginx/http.d/static.conf.template b/nginx/http.d/static.conf.template new file mode 100644 index 0000000..faf5874 --- /dev/null +++ b/nginx/http.d/static.conf.template @@ -0,0 +1,22 @@ +server { + server_name ${DOMAIN}; + location / { + root ${ROOT}; + try_files $uri $uri.html $uri/index.html =404; + error_page 404 /index.html; + } + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/${DOMAIN}/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/${DOMAIN}/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; +} + +server { + if ($$host = ${DOMAIN}) { + return 301 https://$$host$$request_uri; + } # managed by Certbot + server_name ln.joeac.net; + listen 80; + return 404; # managed by Certbot +} |
