diff options
Diffstat (limited to 'nginx/http.d/reverse_proxy.conf.template')
| -rw-r--r-- | nginx/http.d/reverse_proxy.conf.template | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nginx/http.d/reverse_proxy.conf.template b/nginx/http.d/reverse_proxy.conf.template new file mode 100644 index 0000000..dc85cef --- /dev/null +++ b/nginx/http.d/reverse_proxy.conf.template @@ -0,0 +1,20 @@ +server { + server_name ${DOMAIN}; + location / { + proxy_pass http://${HOST}:${PORT}; + } + 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; + } + server_name ${DOMAIN}; + listen 80; + return 404; +} |
