Can't connect to my Ratchet / WebSocket Server

June 2, 2015 1.8k views
LEMP Nginx DigitalOcean PHP Ubuntu

I've been trying to get my WebSocket server (using Ratchet in PHP) running for the better part of the day, I feel like I've tried everything and still no luck. When I try and connect to the WebSocket server in JS it just takes ages and then it times out, essentially, the server accepts the connection (I don't immediately get a connection refused error) but then does nothing.

I'm running a 14.04 Ubuntu with a LEMP stack. I have found loads of nginx configurations to make this work, but none of them worked for me. The strange thing is that it works perfectly fine locally with my Virtual Machine, which is running a LEMP stack as well, with virtually the same nginx configuration. I never needed to configure anything in my nginx to make websockets work.

I'm completely lost, and any help would be really appreciated!

1 comment
1 Answer

Hi @cupoftea696 have you found an answer to this.. just starting my research down this path and want to know the best droplet setup.

Have another answer? Share your knowledge.