mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-18 20:37:55 +00:00
Update vhost-gen templates
This commit is contained in:
parent
a786eb64b0
commit
a1fa5724e8
@ -46,10 +46,10 @@ vhost: |
|
|||||||
ErrorLog "__ERROR_LOG__"
|
ErrorLog "__ERROR_LOG__"
|
||||||
|
|
||||||
# Reverse Proxy definition (Ensure to adjust the port, currently '8000')
|
# Reverse Proxy definition (Ensure to adjust the port, currently '8000')
|
||||||
ProxyRequests On
|
ProxyRequests Off
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyPass / http://php:8000/
|
ProxyPass / http://php:8000/ retry=0
|
||||||
ProxyPassReverse / http://php:8000/
|
ProxyPassReverse / http://php:8000/
|
||||||
|
|
||||||
__REDIRECT__
|
__REDIRECT__
|
||||||
__SSL__
|
__SSL__
|
||||||
@ -92,6 +92,7 @@ features:
|
|||||||
# Alias Definition
|
# Alias Definition
|
||||||
Alias "__ALIAS__" "__PATH____ALIAS__"
|
Alias "__ALIAS__" "__PATH____ALIAS__"
|
||||||
<Location "__ALIAS__">
|
<Location "__ALIAS__">
|
||||||
|
ProxyPass !
|
||||||
__XDOMAIN_REQ__
|
__XDOMAIN_REQ__
|
||||||
</Location>
|
</Location>
|
||||||
<Directory "__PATH____ALIAS__">
|
<Directory "__PATH____ALIAS__">
|
||||||
|
@ -54,10 +54,10 @@ vhost: |
|
|||||||
__REDIRECT__
|
__REDIRECT__
|
||||||
__SSL__
|
__SSL__
|
||||||
__VHOST_DOCROOT__
|
__VHOST_DOCROOT__
|
||||||
__VHOST_RPROXY__
|
|
||||||
__PHP_FPM__
|
__PHP_FPM__
|
||||||
__ALIASES__
|
__ALIASES__
|
||||||
__DENIES__
|
__DENIES__
|
||||||
|
__VHOST_RPROXY__
|
||||||
__SERVER_STATUS__
|
__SERVER_STATUS__
|
||||||
# Custom directives
|
# Custom directives
|
||||||
__CUSTOM__
|
__CUSTOM__
|
||||||
@ -84,13 +84,30 @@ vhost_type:
|
|||||||
Allow from all
|
Allow from all
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
# Reverse Proxy (-r)
|
# Reverse Proxy (-r http(s)://ADDR:PORT)
|
||||||
rproxy: |
|
rproxy: |
|
||||||
# Define the vhost to reverse proxy
|
# Define Reverse Proxy
|
||||||
ProxyRequests On
|
ProxyRequests Off
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyPass __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT____LOCATION__
|
ProxyPass __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/ retry=0
|
||||||
ProxyPassReverse __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT____LOCATION__
|
ProxyPassReverse __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/
|
||||||
|
|
||||||
|
# Reverse Proxy with websocket support (-r ws(s)://ADDR:PORT)
|
||||||
|
rproxy_ws: |
|
||||||
|
# Define Reverse Proxy with Websock support
|
||||||
|
ProxyRequests Off
|
||||||
|
ProxyPreserveHost On
|
||||||
|
<location __LOCATION__>
|
||||||
|
# Websocket Rewrite Settings
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{HTTP:Connection} Upgrade [NC]
|
||||||
|
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||||
|
RewriteRule ^/?(.*)$ __WS_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/$1 [P,L]
|
||||||
|
|
||||||
|
# Reverse Proxy Settings
|
||||||
|
ProxyPass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/ retry=0
|
||||||
|
ProxyPassReverse __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/
|
||||||
|
</location>
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@ -120,6 +137,7 @@ features:
|
|||||||
# Alias Definition
|
# Alias Definition
|
||||||
Alias "__ALIAS__" "__PATH____ALIAS__"
|
Alias "__ALIAS__" "__PATH____ALIAS__"
|
||||||
<Location "__ALIAS__">
|
<Location "__ALIAS__">
|
||||||
|
ProxyPass !
|
||||||
__XDOMAIN_REQ__
|
__XDOMAIN_REQ__
|
||||||
</Location>
|
</Location>
|
||||||
<Directory "__PATH____ALIAS__">
|
<Directory "__PATH____ALIAS__">
|
||||||
|
@ -47,10 +47,10 @@ vhost: |
|
|||||||
ErrorLog "__ERROR_LOG__"
|
ErrorLog "__ERROR_LOG__"
|
||||||
|
|
||||||
# Reverse Proxy definition (Ensure to adjust the port, currently '8000')
|
# Reverse Proxy definition (Ensure to adjust the port, currently '8000')
|
||||||
ProxyRequests On
|
ProxyRequests Off
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyPass / http://php:8000/
|
ProxyPass / http://php:8000/ retry=0
|
||||||
ProxyPassReverse / http://php:8000/
|
ProxyPassReverse / http://php:8000/
|
||||||
|
|
||||||
__REDIRECT__
|
__REDIRECT__
|
||||||
__SSL__
|
__SSL__
|
||||||
@ -93,6 +93,7 @@ features:
|
|||||||
# Alias Definition
|
# Alias Definition
|
||||||
Alias "__ALIAS__" "__PATH____ALIAS__"
|
Alias "__ALIAS__" "__PATH____ALIAS__"
|
||||||
<Location "__ALIAS__">
|
<Location "__ALIAS__">
|
||||||
|
ProxyPass !
|
||||||
__XDOMAIN_REQ__
|
__XDOMAIN_REQ__
|
||||||
</Location>
|
</Location>
|
||||||
<Directory "__PATH____ALIAS__">
|
<Directory "__PATH____ALIAS__">
|
||||||
|
@ -55,10 +55,10 @@ vhost: |
|
|||||||
__REDIRECT__
|
__REDIRECT__
|
||||||
__SSL__
|
__SSL__
|
||||||
__VHOST_DOCROOT__
|
__VHOST_DOCROOT__
|
||||||
__VHOST_RPROXY__
|
|
||||||
__PHP_FPM__
|
__PHP_FPM__
|
||||||
__ALIASES__
|
__ALIASES__
|
||||||
__DENIES__
|
__DENIES__
|
||||||
|
__VHOST_RPROXY__
|
||||||
__SERVER_STATUS__
|
__SERVER_STATUS__
|
||||||
# Custom directives
|
# Custom directives
|
||||||
__CUSTOM__
|
__CUSTOM__
|
||||||
@ -86,13 +86,30 @@ vhost_type:
|
|||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
# Reverse Proxy (-r)
|
# Reverse Proxy (-r http(s)://ADDR:PORT)
|
||||||
rproxy: |
|
rproxy: |
|
||||||
# Define the vhost to reverse proxy
|
# Define Reverse Proxy
|
||||||
ProxyRequests On
|
ProxyRequests Off
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyPass __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT____LOCATION__
|
ProxyPass __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/ retry=0
|
||||||
ProxyPassReverse __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT____LOCATION__
|
ProxyPassReverse __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/
|
||||||
|
|
||||||
|
# Reverse Proxy with websocket support (-r ws(s)://ADDR:PORT)
|
||||||
|
rproxy_ws: |
|
||||||
|
# Define Reverse Proxy with Websock support
|
||||||
|
ProxyRequests Off
|
||||||
|
<location __LOCATION__>
|
||||||
|
# Websocket Rewrite Settings
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{HTTP:Connection} Upgrade [NC]
|
||||||
|
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||||
|
RewriteRule ^/?(.*)$ __WS_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/$1 [P,L]
|
||||||
|
|
||||||
|
# Reverse Proxy Settings
|
||||||
|
ProxyPreserveHost On
|
||||||
|
ProxyPass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/ retry=0
|
||||||
|
ProxyPassReverse __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/
|
||||||
|
</location>
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@ -141,6 +158,7 @@ features:
|
|||||||
# Alias Definition
|
# Alias Definition
|
||||||
Alias "__ALIAS__" "__PATH____ALIAS__"
|
Alias "__ALIAS__" "__PATH____ALIAS__"
|
||||||
<Location "__ALIAS__">
|
<Location "__ALIAS__">
|
||||||
|
ProxyPass !
|
||||||
__XDOMAIN_REQ__
|
__XDOMAIN_REQ__
|
||||||
</Location>
|
</Location>
|
||||||
<Directory "__PATH____ALIAS__">
|
<Directory "__PATH____ALIAS__">
|
||||||
|
@ -48,8 +48,11 @@ vhost: |
|
|||||||
|
|
||||||
# Reverse Proxy definition (Ensure to adjust the port, currently '8000')
|
# Reverse Proxy definition (Ensure to adjust the port, currently '8000')
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header Host $host;
|
# https://stackoverflow.com/a/72586833
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
# Proxy connection
|
||||||
proxy_pass http://php:8000;
|
proxy_pass http://php:8000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,12 +75,31 @@ vhost_type:
|
|||||||
root "__DOCUMENT_ROOT__";
|
root "__DOCUMENT_ROOT__";
|
||||||
index __INDEX__;
|
index __INDEX__;
|
||||||
|
|
||||||
# Reverse Proxy (-r)
|
# Reverse Proxy (-r http(s)://ADDR:PORT)
|
||||||
rproxy: |
|
rproxy: |
|
||||||
# Define the vhost to reverse proxy
|
# Define Reverse Proxy
|
||||||
location __LOCATION__ {
|
location __LOCATION__ {
|
||||||
proxy_set_header Host $host;
|
# https://stackoverflow.com/a/72586833
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
# Proxy connection
|
||||||
|
proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Reverse Proxy with websocket support (-r ws(s)://ADDR:PORT)
|
||||||
|
rproxy_ws: |
|
||||||
|
# Define Reverse Proxy with Websock support
|
||||||
|
location __LOCATION__ {
|
||||||
|
# https://stackoverflow.com/a/72586833
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
# Websocket settings
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
# Proxy connection
|
||||||
proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__;
|
proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user