Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. a2enmod rewrite proxy proxy_wstunnel
  2.  
  3. <VirtualHost subdomain.mydomain.com:80>
  4. Servername subdomain.mydomain.com
  5.  
  6. RewriteEngine On
  7. RewriteCond %{REQUEST_URI} ^/socket.io [NC]
  8. RewriteCond %{QUERY_STRING} transport=websocket [NC]
  9. RewriteRule /(.*) ws://localhost:3001/$1 [P,L]
  10.  
  11. ProxyPass /socket.io http://localhost:3001/socket.io
  12. ProxyPassReverse /socket.io http://localhost:3001/socket.io
  13. </VirtualHost>
  14.  
  15. server.listen('3001', function(){
  16. console.log('Socket.io server listening on *:3001');
  17. });
  18.  
  19.  
  20. io.listen(server).on('connection', function(client) {
  21. // Rest of the code
  22. }
  23.  
  24. var socket = io.connect('http://subdomain.mydomain.com/', {query: {extra_info : extra_info}});
  25.  
  26. GET http://subdomain.mydomain.com:8100/socket.io/?extra_info=fe4567&EIO=3&transport=polling&t=1416987210079-31 net::ERR_CONNECTION_TIMED_OUT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement