A NGINX Sample Config File for Tornado

#//tornado.conf

user nginx;  
worker_processes 5;

error_log /var/log/nginx/error.log;

pid /var/run/nginx.pid;

events {  
    worker_connections 1024;
    use epoll;
}

proxy_next_upstream error;

upstream tornadoes {  
    server 127.0.0.1:8000;
    server 127.0.0.1:8001;
    server 127.0.0.1:8002;
    server 127.0.0.1:8003;
}

server {  
    listen 80;
    server_name www.example.org *.example.org;

    location /static/ {
        root /var/www/static;
        if ($query_string) {
            expires max;
        }
    }

    location / {
        proxy_pass_header Server;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_pass http://tornadoes;
    }
}