File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed
Dockerfiles/data/vhost-gen/templates-main Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,31 @@ vhost_type:
8484 root "__DOCUMENT_ROOT__";
8585 index __INDEX__;
8686
87- # Reverse Proxy (-r)
87+ # Reverse Proxy (-r http(s)://ADDR:PORT )
8888 rproxy : |
89- # Define the vhost to reverse proxy
89+ # Define Reverse Proxy
9090 location __LOCATION__ {
91- proxy_set_header Host $host;
92- proxy_set_header X-Real-IP $remote_addr;
91+ # https://stackoverflow.com/a/72586833
92+ proxy_set_header Host $host;
93+ proxy_set_header X-Real-IP $remote_addr;
94+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
95+ # Proxy connection
96+ proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__;
97+ }
98+
99+ # Reverse Proxy with websocket support (-r ws(s)://ADDR:PORT)
100+ rproxy_ws : |
101+ # Define Reverse Proxy with Websock support
102+ location __LOCATION__ {
103+ # https://stackoverflow.com/a/72586833
104+ proxy_set_header Host $host;
105+ proxy_set_header X-Real-IP $remote_addr;
106+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
107+ # Websocket settings
108+ proxy_http_version 1.1;
109+ proxy_set_header Upgrade $http_upgrade;
110+ proxy_set_header Connection "Upgrade";
111+ # Proxy connection
93112 proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__;
94113 }
95114
You can’t perform that action at this time.
0 commit comments