Using nginx as a proxy for WebSocket connections

Some people just want their entire world to run through nginx :) Well this is how you can get your WebSockets flowing through ports 80 and 443 with nginx. Setting up the Server Configuration By default your nginx configuration should be locations at /etc/nginx/sites-enabled/default and should already container a bit of config that looks kind of like this server { listen 80 default_server; server_name; ... location / { ... } } We are going to be adding another server configuration beneath this one that looks like this server { listen 80; #Only use this line if you want to enable wss: »

The tutorial for PHP WebSockets that I wish had existed...

About a year ago now I decided I wanted to move away from AJAX serving updates to dynamic content and into the future that is WebSockets. If you don't know what WebSockets are you should probably stop reading this and go find out all about them. So here I am thinking "Yes, let's go use websockets" and then hitting a brick wall. All the nice solutions it seemed were written for node (WebSockets were designed for JS after all). After a bit of Googling I found what appeared to be the solution for me. Enter Ratchet Here is where the »