I was trying to introduce socket.io to my application developed in Laravel and in AngularJS.
The application works fine in my computer, nevertheless when I try to make i
Socket.io use /socket.io after your domaine name. Then you have to specify the socket.io location :
location ~* \.io {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
And don't forget the upstream for your node js app
upstream app_yourdomain {
server 127.0.0.1:3000;
keepalive 8;
}