Fixed proxy pass.
authorLuke Hoersten <luke@hoersten.org>
Sun, 06 Nov 2022 18:23:19 -0600
changeset 200 10051617d075
parent 199 9aa5f284ea10
child 201 e209c4dc5280
Fixed proxy pass.
dendrite/server/templates/nginx.conf.j2
ergo/templates/nginx.conf.j2
miniflux/templates/nginx.conf.j2
pleroma/otp/templates/pleroma.cloudflare.index.nginx.conf.j2
pleroma/otp/templates/pleroma.cloudflare.nginx.conf.j2
pleroma/otp/templates/pleroma.letsencrypt.nginx.conf.j2
writefreely/server/templates/nginx.conf.j2
--- a/dendrite/server/templates/nginx.conf.j2	Sat Oct 22 14:51:55 2022 -0500
+++ b/dendrite/server/templates/nginx.conf.j2	Sun Nov 06 18:23:19 2022 -0600
@@ -37,7 +37,8 @@
     proxy_read_timeout                 600;
 
     location /_matrix {
-        proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
+        set $upstream http://127.0.0.1:{{nginx_proxy_port}};
+        proxy_pass $upstream;
     }
 
     root /var/www/{{nginx_server_name}};
--- a/ergo/templates/nginx.conf.j2	Sat Oct 22 14:51:55 2022 -0500
+++ b/ergo/templates/nginx.conf.j2	Sun Nov 06 18:23:19 2022 -0600
@@ -1,6 +1,9 @@
 server {
       listen 6697 ssl;
-      proxy_pass unix:/var/ergo/socket;
+
+      set $upstream unix:/var/ergo/socket;
+      proxy_pass $upstream;
+
       proxy_protocol on;
 
       ssl_certificate {{nginx_ssl_cert}};
--- a/miniflux/templates/nginx.conf.j2	Sat Oct 22 14:51:55 2022 -0500
+++ b/miniflux/templates/nginx.conf.j2	Sun Nov 06 18:23:19 2022 -0600
@@ -20,7 +20,9 @@
     ssl_stapling_verify on;
 
     location / {
-        proxy_pass {{nginx_proxy_pass}};
+        set $upstream {{nginx_proxy_pass}};
+        proxy_pass $upstream;
+
         proxy_redirect off;
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
--- a/pleroma/otp/templates/pleroma.cloudflare.index.nginx.conf.j2	Sat Oct 22 14:51:55 2022 -0500
+++ b/pleroma/otp/templates/pleroma.cloudflare.index.nginx.conf.j2	Sun Nov 06 18:23:19 2022 -0600
@@ -61,7 +61,8 @@
         proxy_set_header Connection "upgrade";
         proxy_set_header Host $http_host;
 
-        proxy_pass {{pleroma_proxy_pass}};
+        set $upstream {{pleroma_proxy_pass}};
+        proxy_pass $upstream;
 
         client_max_body_size 16m;
     }
@@ -70,7 +71,9 @@
         proxy_cache {{pleroma_instance}}-pleroma_media_cache;
         proxy_cache_lock on;
         proxy_ignore_client_abort on;
-        proxy_pass {{pleroma_proxy_pass}};
+
+        set $upstream {{pleroma_proxy_pass}};
+        proxy_pass $upstream;
     }
 
     # don't expose prometheus stats publicly
--- a/pleroma/otp/templates/pleroma.cloudflare.nginx.conf.j2	Sat Oct 22 14:51:55 2022 -0500
+++ b/pleroma/otp/templates/pleroma.cloudflare.nginx.conf.j2	Sun Nov 06 18:23:19 2022 -0600
@@ -53,7 +53,8 @@
         proxy_set_header Connection "upgrade";
         proxy_set_header Host $http_host;
 
-        proxy_pass {{pleroma_proxy_pass}};
+        set $upstream {{pleroma_proxy_pass}};
+        proxy_pass $upstream;
 
         client_max_body_size 16m;
     }
@@ -62,7 +63,9 @@
         proxy_cache {{pleroma_instance}}-pleroma_media_cache;
         proxy_cache_lock on;
         proxy_ignore_client_abort on;
-        proxy_pass {{pleroma_proxy_pass}};
+
+        set $upstream {{pleroma_proxy_pass}};
+        proxy_pass $upstream;
     }
 
     # don't expose prometheus stats publicly
--- a/pleroma/otp/templates/pleroma.letsencrypt.nginx.conf.j2	Sat Oct 22 14:51:55 2022 -0500
+++ b/pleroma/otp/templates/pleroma.letsencrypt.nginx.conf.j2	Sun Nov 06 18:23:19 2022 -0600
@@ -58,7 +58,8 @@
         proxy_set_header Connection "upgrade";
         proxy_set_header Host $http_host;
 
-        proxy_pass {{pleroma_proxy_pass}};
+        set $upstream {{pleroma_proxy_pass}};
+        proxy_pass $upstream;
 
         client_max_body_size 16m;
     }
@@ -67,7 +68,9 @@
         proxy_cache {{pleroma_instance}}-pleroma_media_cache;
         proxy_cache_lock on;
         proxy_ignore_client_abort on;
-        proxy_pass {{pleroma_proxy_pass}};
+
+        set $upstream {{pleroma_proxy_pass}};
+        proxy_pass $upstream;
     }
 
     # don't expose prometheus stats publicly
--- a/writefreely/server/templates/nginx.conf.j2	Sat Oct 22 14:51:55 2022 -0500
+++ b/writefreely/server/templates/nginx.conf.j2	Sun Nov 06 18:23:19 2022 -0600
@@ -34,7 +34,10 @@
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $remote_addr;
-        proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
+
+        set $upstream http://127.0.0.1:{{nginx_proxy_port}};
+        proxy_pass $upstream;
+
         proxy_redirect off;
     }
 
@@ -48,7 +51,10 @@
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $remote_addr;
-        proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
+
+        set $upstream http://127.0.0.1:{{nginx_proxy_port}};
+        proxy_pass $upstream;
+
         proxy_redirect off;
     }
 }