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: »