pid /tmp/pid.pid; daemon off; events {} http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /dev/stdout main; server { listen 8080; server_name localhost; root /tmp/2h; location / { try_files $uri $uri.html $uri/ =404; autoindex on; types { text/html html; text/css css; application/javascript js; image/x-icon ico; } } location /_/ { proxy_pass http://127.0.0.1:5000; proxy_set_header Host $host; 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; } } }