nginx.conf 484 B

1234567891011121314151617181920212223242526
  1. upstream django {
  2. server 127.0.0.1:8080;
  3. }
  4. server {
  5. listen 80;
  6. access_log /dev/null;
  7. error_log /dev/null;
  8. location / {
  9. proxy_pass http://django;
  10. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  11. proxy_set_header Host $host;
  12. proxy_redirect off;
  13. }
  14. location /static/ {
  15. autoindex on;
  16. alias /srv/app/static/;
  17. }
  18. location /media/ {
  19. autoindex on;
  20. alias /srv/app/media/;
  21. }
  22. }