| 1234567891011121314151617181920212223242526272829303132 |
- upstream django_project {
- server localhost:8000;
- }
- error_log /var/log/nginx/error.log;
- server {
- listen 80;
- access_log /var/log/nginx/access.log;
- location / {
- proxy_pass http://django_project;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
- proxy_redirect off;
- client_max_body_size 100M;
- }
- location /static/ {
- alias /app/staticfiles/;
- }
- location /media/ {
- alias /app/mediafiles/;
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/html;
- }
- }
|