upstream pyrone-blog {
        server 127.0.0.1:5000;
        #server 127.0.0.1:5001; 
}

server { 
        listen   81; ## listen for ipv4; this line is default and implied
        #listen   [::]:80 default ipv6only=on; ## listen for ipv6

        server_name blog.example.com;
        access_log /home/user/pyrone-blog/nginx-access.log;

        location / {
                proxy_set_header        Host $host:$server_port;
                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 $scheme;

                client_max_body_size    10m;
                client_body_buffer_size 128k;
                proxy_connect_timeout   60s;
                proxy_send_timeout      90s;
                proxy_read_timeout      90s;
                proxy_buffering         off;
                proxy_temp_file_write_size 64k;
                proxy_pass http://pyrone-blog;
                proxy_redirect          off;
        }
        
        # uncomment if you want nginx to serve static files
        #location /static {
        #    root                    /home/user/pyrone-blog/env/lib/python2.6/site-packages/pyrone/;
        #    expires                 30d;
        #    add_header              Cache-Control public;
        #    #access_log              off;
        #}
}

