Ratchet and SSL using nginx

193 views
Skip to first unread message

Sergio Rinaudo

unread,
Apr 20, 2014, 11:22:31 PM4/20/14
to ratch...@googlegroups.com
Hi everyone,
I've done a lots of searches and tests before to post this question,
I've also noticed that lots of people did encounter this problem.

I've followed the Ratchet chat tutorial (http://socketo.me/docs/hello-world)
without ssl and everything works fine.

Then I've installed SSL and proceed to the next Ratchet tutorial (http://socketo.me/docs/push)
but I've encountered problem with Websocket connection.

So I decided to try to make the "chat example" works using SSL before to proceed.

I've found that nginx has to be configured to make everything works so I configured it like
this post:

http://stackoverflow.com/questions/22493646/ratchet-nginx-ssl-secure-websocket

The problem now is even though in the terminal I get the message "new connection idXXX",
Websocket's onopen method never fires client side.

Then after a while, in the Firebug console I get the "cannot establish connection" error message.

Any advices on how to fix this situation?

Thanks







Sergio Rinaudo

unread,
Apr 21, 2014, 12:37:06 AM4/21/14
to ratch...@googlegroups.com
I give it a try updating nginx and now it's working!!

I was using nginx 1.2.1 an installing 1.4.7 fixed the problem.

I followed this guide to update nginx
https://www.digitalocean.com/community/questions/installing-nginx-1-4-4-on-debian-wheezy-os

just replace the 1.4.4 with the latest version and it works
Reply all
Reply to author
Forward
0 new messages