How to configure Apache2 to proxy WebSocket connection (BrowserSync for example), if it\'s made on the same URL, with only difference being header \"Upgrade: websocket\" and
Thanks a lot to metalim! I publish the full configuration here for reference:
ServerName example.org
ServerAlias *.example.org
ServerAdmin sysadmin@example.org
ProxyRequests Off
ProxyPreserveHost On
RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) ws://192.168.1.1/$1 [P,L]
ProxyPass / http://192.168.1.1/ retry=1
ProxyPassReverse / http://192.168.1.1/
ErrorLog /var/log/apache2/example.org.error.log
CustomLog /var/log/apache2/example.org.access.log combined