| 1 | server { |
| 2 | listen 80; |
| 3 | server_name app.internal; |
| 4 | |
| 5 | location /static/ { |
| 6 | alias /srv/app/static/; |
| 7 | expires 30d; |
| 8 | } |
| 9 | |
| 10 | location / { |
| 11 | proxy_pass http://127.0.0.1:8000; |
| 12 | proxy_set_header Host $host; |
| 13 | proxy_set_header X-Real-IP $remote_addr; |
| 14 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 15 | proxy_set_header X-Forwarded-Proto $scheme; |
| 16 | proxy_read_timeout 120; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | # gunicorn: gunicorn -w 4 -b 127.0.0.1:8000 app:application |
| 21 |