merge both apache with subpath examples (> 2.4.47) as both have been made more or less identical, also remove outdated information about proxy_wstunnel_module

Stefan Melmuk
2025-07-09 18:58:47 +02:00
parent fdcf375080
commit 61ccdba4e9

@@ -468,7 +468,9 @@ server {
<details>
<summary>Apache (by fbartels)</summary><br/>
Remember to enable `mod_proxy_wstunnel` and `mod_proxy_http`, for example with: `a2enmod proxy_wstunnel` and `a2enmod proxy_http`.
Remember to enable `mod_proxy_http`, for example with: `a2enmod proxy_http`.
This requires Apache >= 2.4.47
```apache
<VirtualHost *:443>
SSLEngine on
@@ -494,7 +496,8 @@ Remember to enable `mod_proxy_wstunnel` and `mod_proxy_http`, for example with:
</details>
<details>
<summary>Apache in a sub-location (by <a href=https://github.com/agentdr8 target=_blank>@agentdr8</a>)</summary><br/>
<summary>Apache in a sub-location (by <a href=https://github.com/agentdr8 target=_blank>@agentdr8</a> and <a href="https://github.com/NoseyNick" target="_blank">@NoseyNick</a>)</summary><br/>
Modify your docker start-up to include the sub-location.
```
@@ -502,19 +505,12 @@ Modify your docker start-up to include the sub-location.
DOMAIN=https://shared.example.tld/vault/
```
Ensure you have the websocket proxy module loaded somewhere in your apache config.
It can look something like:
```
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so`
```
On some OS's you can use a2enmod, for example with: `a2enmod proxy_wstunnel` and `a2enmod proxy_http`.
Remember to enable `mod_proxy_http`, for example with: `a2enmod proxy_http`. This requires Apache >= 2.4.47
```apache
<VirtualHost *:443>
SSLEngine on
ServerName $hostname.$domainname
ServerName shared.example.tld
SSLCertificateFile ${SSLCERTIFICATE}
SSLCertificateKeyFile ${SSLKEY}
@@ -526,34 +522,13 @@ On some OS's you can use a2enmod, for example with: `a2enmod proxy_wstunnel` and
<Location /vault/> #adjust here if necessary
ProxyPass http://127.0.0.1:8000/vault/ upgrade=websocket
ProxyPreserveHost Off
ProxyPreserveHost On
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
</Location>
</VirtualHost>
```
</details>
<details>
<summary>Apache 2.4.47 (or later) in a sub-location (by <a href="https://github.com/NoseyNick" target="_blank">@NoseyNick</a>)</summary><br/>
The regular `mod_proxy` now supports upgrading to websockets, with `upgrade=websocket`, no need for `mod_proxy_wstunnel`.
Copy the instructions above, except use the much simpler...
```apache
<VirtualHost *:443>
[ blah blah ]
<Location /vault/> #adjust here if necessary
ProxyPass http://127.0.0.1:8000/vault/ upgrade=websocket
ProxyPreserveHost On
ProxyRequests Off # ... is the default, but as a safety-net
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
</Location>
</VirtualHost>
```
</details>
<details>
<summary>Traefik v2 (docker-compose example by hwwilliams, gzfrozen)</summary><br/>