upstream gunicorn { #server 172.25.0.22:443 fail_timeout=0; server web2py-rocket-ssl:443 fail_timeout=0; } server { #listen 172.25.0.23:80 default_server; listen web2py-nginx:80 default_server; location / { try_files $uri @proxy_to_gunicorn; } location @proxy_to_gunicorn { proxy_set_header X-Real-IP $remote_addr; proxy_redirect off; proxy_set_header Host $host; proxy_pass http://gunicorn; } }