summaryrefslogtreecommitdiff
path: root/nginx/http.d/reverse_proxy.conf.template
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-07-02 23:16:29 +0100
committerJoe Carstairs <me@joeac.net>2026-07-02 23:16:29 +0100
commitb705e9e1e5761008623826a67638fb739d503153 (patch)
treeb1cef51920cabfeea48db78809b2e7d1a08d891d /nginx/http.d/reverse_proxy.conf.template
parent87a6a3f1f8cc9c9c47ed18791ab79c7203613695 (diff)
nginx installation uses templates and vars instead of explicit conf for
each module
Diffstat (limited to 'nginx/http.d/reverse_proxy.conf.template')
-rw-r--r--nginx/http.d/reverse_proxy.conf.template20
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;
+}