Hello! I’ve got an issue with my droplet. Maybe nginx config is bad, but I have no idea what goes wrong. When I have started node.js on 7000 port (I tried 3000, 3001 and others) and went from my browser (or any other browser from several machines) to droplet IP:port everything works correct. Socket.io works, navigation, sessionStore, authentication and other. Problem begun when I start nginx server. It listens node.js’ port and makes a connection to my domain. If I try to connect mydomain.com from browser it works everywhere except Google Chrome. I tried to catch this error and a problem is: Chrome tried to connect server with ‘user-agent’: ‘WebIndex’ with no handshakeData in request.headers.cookie. It breaks down connection in this browser, but in others my site works correctly.
This is strange because everything works good when I connect to droplet_IP:7000 instead of mydomain.com. There is no solution in google or stackoverflow and I have no idea what should I do. There is my stackoverflow question: http://stackoverflow.com/questions/26897525/socket-io-trouble-in-nginx
Is problem depends from bad domain name, proxy server or bad DNS? Thanks for help.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
does it work now? is it possible that socket.io doesnt work on digitalocean? have similar problem: https://www.digitalocean.com/community/questions/socket-io-node-js-with-dokku
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.