Here is the LogFormat I set: LogFormat "%t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{no-proxy}e" debug CustomLog "logs/debug.log" debug Excerpt from the log comparing two different request types - one with the upgrade (transport=websocket), the other without: [08/Sep/2017:08:56:36 +1000] "GET /socket.io/?EIO=3&transport=polling&t=LvUZo-4 HTTP/1.1" 200 101 "http://buzzer.click/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0" - [08/Sep/2017:08:56:36 +1000] "GET /socket.io/?EIO=3&transport=websocket&sid=2CxfW3Fj5pDd7mpWAAAf HTTP/1.1" 400 34 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0” - The no-proxy is unset for both (denoted by the ‘-' I assume). I’ve double checked and the transport=websocket request from the browser definitely has the Upgrade: websocket header, while the former definitely does not. Here is the apache config I am using so you can see exactly what I have done: <VirtualHost buzzer.click:80> ServerAdmin webmaster@localhost ServerName buzzer.click DocumentRoot /var/www/buzzer.click/www <Directory /var/www/buzzer.click/www> Options -Indexes +FollowSymLinks AllowOverride None Require all granted </Directory> <Proxy *> Require all granted </Proxy> ProxyRequests Off ProxyPreserveHost On ProxyVia Full # Don't allow ProxyPass to find these SetEnvIf Upgrade (?i)websocket no-proxy=1 RewriteEngine on RewriteCond %{HTTP:Upgrade} "(?i)websocket" RewriteRule ^/(.*)$ ws://localhost:3000/$1 [P] ProxyPass / http://localhost:3000/ LogFormat "%t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{no-proxy}e" debug CustomLog "logs/debug.log" debug LogLevel warn </VirtualHost> Have I missed something? Thanks again for your help Eric. D.
|