Simpler ProxyPass for Apache 2.4.47 or later

Nosey Nick
2025-01-26 17:06:21 -05:00
parent d3d98860d8
commit 85d68a500d

@@ -524,6 +524,26 @@ On some OS's you can use a2enmod, for example with: `a2enmod proxy_wstunnel` and
```
</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 /$sublocation/> #adjust here if necessary
ProxyPass http://$server:$port/$sublocation/ 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 v1 (docker-compose example)</summary><br/>