File tree 1 file changed +23
-4
lines changed
Dockerfiles/data/vhost-gen/templates-main
1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,31 @@ vhost_type:
84
84
root "__DOCUMENT_ROOT__";
85
85
index __INDEX__;
86
86
87
- # Reverse Proxy (-r)
87
+ # Reverse Proxy (-r http(s)://ADDR:PORT )
88
88
rproxy : |
89
- # Define the vhost to reverse proxy
89
+ # Define Reverse Proxy
90
90
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
93
112
proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__;
94
113
}
95
114
You can’t perform that action at this time.
0 commit comments