try to close #1314

Got it from: https://stackoverflow.com/a/41388585 & https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html
In my test, it works

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey 2022-12-23 00:25:32 +01:00
parent 3eb2b164e1
commit 14e095b569

View file

@ -46,10 +46,11 @@ Add this as a new Apache site config:
RewriteEngine On
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:11000/
ProxyPass / http://localhost:11000/ nocanon
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://localhost:11000/$1" [P,QSA,B=?:;]
RewriteCond %{THE_REQUEST} "^[a-zA-Z]+ /(.*) HTTP/\d+(\.\d+)?$"
RewriteRule .? "ws://localhost:11000/%1" [P,L]
# Enable h2, h2c and http1.1
Protocols h2 h2c http/1.1