Skip to content

Instantly share code, notes, and snippets.

@Jahroots
Forked from toddsby/patch.txt
Created February 15, 2017 09:42
Show Gist options
  • Save Jahroots/cd41ab65ab157f597a2afc1e790baa1a to your computer and use it in GitHub Desktop.
Save Jahroots/cd41ab65ab157f597a2afc1e790baa1a to your computer and use it in GitHub Desktop.
socket.io and apache reverse proxy fix
I modified the source code of socket.io-client/socket.io.js 1.0.6
line 3387:
return schema + '://' + this.hostname + port + this.path + query;
Changed to:
return schema + '://' + this.hostname + port + this.path + 'ws/' + query;
And my ProxyPass config:
ProxyPass /socket.io/ws/ ws://localhost:60002/socket.io/
ProxyPassReverse /socket.io/ws/ ws://localhost:60002/socket.io/
ProxyPass /socket.io/ http://localhost:60002/socket.io/
ProxyPassReverse /socket.io/ http://localhost:60002/socket.io/
It works well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment