Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a2enmod rewrite proxy proxy_wstunnel
- <VirtualHost subdomain.mydomain.com:80>
- Servername subdomain.mydomain.com
- RewriteEngine On
- RewriteCond %{REQUEST_URI} ^/socket.io [NC]
- RewriteCond %{QUERY_STRING} transport=websocket [NC]
- RewriteRule /(.*) ws://localhost:3001/$1 [P,L]
- ProxyPass /socket.io http://localhost:3001/socket.io
- ProxyPassReverse /socket.io http://localhost:3001/socket.io
- </VirtualHost>
- server.listen('3001', function(){
- console.log('Socket.io server listening on *:3001');
- });
- io.listen(server).on('connection', function(client) {
- // Rest of the code
- }
- var socket = io.connect('http://subdomain.mydomain.com/', {query: {extra_info : extra_info}});
- 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