user nobody; worker_processes 1; pid /run/nginx.pid; events { worker_connections 768; } http { server_tokens off; include /etc/nginx/mime.types; default_type application/octet-stream; proxy_cache_path /var/cache/nginx keys_zone=cache:10m max_size=1g inactive=60m use_temp_path=off; server { listen 1337; server_name _; location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { proxy_cache cache; proxy_cache_valid 200 3m; proxy_cache_use_stale error timeout updating; expires 3m; add_header Cache-Control "public"; proxy_pass http://unix:/tmp/gunicorn.sock; 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; } location / { proxy_pass http://unix:/tmp/gunicorn.sock; 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; } access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; } }