error_log /var/log/nginx/error.log debug; http { limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; client_body_temp_path /tmp/nginx 1 2; proxy_temp_path /tmp/nginx-proxy; fastcgi_temp_path /tmp/nginx-fastcgi; uwsgi_temp_path /tmp/nginx-uwsgi; scgi_temp_path /tmp/nginx-scgi; upstream tosca_server { server unix:/run/gunicorn/tosca_server.sock fail_timeout=0; } server { listen 8085 ; charset utf-8; client_max_body_size 75M; # adjust to taste access_log /var/log/nginx/nginx-access.log; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://tosca_server; limit_req zone=one; } } } #http events { worker_connections 4096; ## Default: 1024 }