From 85d68a500d17c140a9fe59dd092dc999fdb486c1 Mon Sep 17 00:00:00 2001 From: Nosey Nick Date: Sun, 26 Jan 2025 17:06:21 -0500 Subject: [PATCH] Simpler ProxyPass for Apache 2.4.47 or later --- Proxy-examples.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Proxy-examples.md b/Proxy-examples.md index 228c1fc..fef3421 100644 --- a/Proxy-examples.md +++ b/Proxy-examples.md @@ -524,6 +524,26 @@ On some OS's you can use a2enmod, for example with: `a2enmod proxy_wstunnel` and ``` +
+Apache 2.4.47 (or later) in a sub-location (by @NoseyNick)
+ +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 + + [ blah blah ] + #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 + + +``` +
+
Traefik v1 (docker-compose example)