From b705e9e1e5761008623826a67638fb739d503153 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Thu, 2 Jul 2026 23:16:29 +0100 Subject: nginx installation uses templates and vars instead of explicit conf for each module --- nginx/http.d/reverse_proxy.conf.template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 nginx/http.d/reverse_proxy.conf.template (limited to 'nginx/http.d/reverse_proxy.conf.template') 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; +} -- cgit v1.2.3