worker_processes auto; daemon off; pid /tmp/nginx.pid; error_log /dev/stderr; worker_rlimit_nofile 4096; events { worker_connections 2048; } http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log /dev/stdout combined; upstream gunicorn { server unix:/tmp/gunicorn.sock; } server { listen %NGINX_HTTP_PORT% deferred; client_max_body_size 0; keepalive_timeout 3; location ~ ^/(ping|invocations|execution-parameters) { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_read_timeout %NGINX_PROXY_READ_TIMEOUT%s; proxy_pass http://gunicorn; } location / { return 404 "{}"; } } }