Doc Info: Direct support for websockets with Nginx>=1.3.13 #371

davecoutts opened this Issue Mar 15, 2013 · 1 comment


None yet
2 participants

The snippet below could be added to the circushttpd document.

Running circus-web in Nginx, with websocket support. Nginx>=1.3.13
As of Nginx>=1.3.13 websockets are supported by the web server.
With Nginx>=1.3.13 there is no longer a need to reroute websocket traffic via Varnish or Haproxy.

On Ubuntu you can install Nginx>=1.3.13 from Chris Lea's development branch PPA, as so,

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/nginx-devel
sudo apt-get update
sudo apt-get install nginx
nginx -v

An example Nginx config with websocket support.

# /etc/nginx/sites-enabled/default

upstream circusweb_server {
        server localhost:8080;

server {

    listen   80;
    server_name  _;

    location / {
            proxy_pass http://circusweb_server;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;

            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto http;

            proxy_redirect off;

    location ~/media/*(.png|.jpg|.css|.js|.ico)$ {
        alias   /path_to_site-packages/circusweb/media/;


This comment has been minimized.

Show comment
Hide comment

tarekziade Mar 16, 2013


thanks! will add it


tarekziade commented Mar 16, 2013

thanks! will add it

@ghost ghost assigned tarekziade Mar 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment