79222237

Date: 2024-11-25 08:43:35
Score: 1
Natty:
Report link

You are missing (in the latter example): RewriteEngine on

I also changed the last line a bit, and got it working with:

   RewriteEngine on
   RewriteCond %{HTTP:Connection} Upgrade [NC]
   RewriteCond %{HTTP:Upgrade} websocket [NC]
   RewriteRule ^/?(.*) "ws://127.0.0.1:30000/$1" [P,L]

But on Apache >= 2.4.47 you can just do:

ProxyPass http://127.0.0.1:30000/ upgrade=websocket

No need to add upgrade=websocket to ProxyPassReverse on the other hand.

References:

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: p0358