I have nginx configured such that any php request goes to Apache server and any url with /node/ in it goes to the node server running on 8888 including a socket listener.
the nginx.conf is as below
server { listen 80; server_name http://domain; location / { proxy_pass http://localhost:8080; } location /node { rewrite ^/node(.+)$ $1 break; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://localhost:8888; } } Now the problem is that a socket.io request i.e io.connect('domain/node/') fails with the reposnse at client as "The requested URL /socket.io/1/ was not found on this server", response being served from apache!!. But any other node request goes to the node server as expected. only the socket.io request fails.
Also if I run the socket connect URL directly as seen in the browser request which looks something likedomain/node/socket.io/1/?t=1380201512328 works perfectly fine and I can see handshake authorized 8wGgJYUvNdwAdcqenxQd on node server.