Enclose wss proxy directives in IfModule

So it should work even if mod_proxy_wstunnel isn't available (socket.io should fallback to another method like xhr-polling)
master
Daniel Berteaud 11 years ago
parent 62e769a2b3
commit 75c683b8b4
  1. 6
      conf/httpd_alias.conf
  2. 6
      conf/httpd_vhost.conf

@ -1,5 +1,7 @@
ProxyPass /socket.io/1/websocket ws://localhost:8888/socket.io/1/websocket <IfModule mod_proxy_wstunnel.so>
ProxyPassReverse /socket.io/1/websocket ws://localhost:8888/socket.io/1/websocket ProxyPass /socket.io/1/websocket ws://localhost:8888/socket.io/1/websocket
ProxyPassReverse /socket.io/1/websocket ws://localhost:8888/socket.io/1/websocket
</IfModule>
ProxyPass /socket.io/ http://localhost:8888/socket.io/ ProxyPass /socket.io/ http://localhost:8888/socket.io/
ProxyPassReverse /socket.io/ http://localhost:8888/socket.io/ ProxyPassReverse /socket.io/ http://localhost:8888/socket.io/
AliasMatch ^/vroom/([a-z]{2}/)?(\d{10}/)?((js|css|img|fonts|snd)/.*) /opt/vroom/public/$3 AliasMatch ^/vroom/([a-z]{2}/)?(\d{10}/)?((js|css|img|fonts|snd)/.*) /opt/vroom/public/$3

@ -8,8 +8,10 @@
ServerName vroom.example.com ServerName vroom.example.com
SSLEngine on SSLEngine on
DocumentRoot /opt/vroom/public DocumentRoot /opt/vroom/public
ProxyPass /socket.io/1/websocket ws://localhost:8889/socket.io/1/websocket <IfModule mod_proxy_wstunnel.so>
ProxyPassReverse /socket.io/1/websocket ws://localhost:8888/socket.io/1/websocket ProxyPass /socket.io/1/websocket ws://localhost:8889/socket.io/1/websocket
ProxyPassReverse /socket.io/1/websocket ws://localhost:8888/socket.io/1/websocket
</IfModule>
ProxyPass /socket.io/ http://localhost:8888/socket.io/ ProxyPass /socket.io/ http://localhost:8888/socket.io/
ProxyPassReverse /socket.io/ http://localhost:8888/socket.io/ ProxyPassReverse /socket.io/ http://localhost:8888/socket.io/
AliasMatch ^/([a-z]{2}/)?(\d{10}/)?((js|css|img|fonts|snd)/.*) /opt/vroom/public/$3 AliasMatch ^/([a-z]{2}/)?(\d{10}/)?((js|css|img|fonts|snd)/.*) /opt/vroom/public/$3

Loading…
Cancel
Save