Advertisement
saper663

nginx.conf

Feb 20th, 2022
783
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.50 KB | None | 0 0
  1. upstream project {
  2.     server web:8000;
  3. }
  4.  
  5. server {
  6.  
  7.     listen 80;
  8.     access_log /var/log/nginx/access.log;
  9.     error_log /var/log/nginx/error.log;
  10.  
  11.     location / {
  12.         proxy_pass http://project;
  13.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  14.         proxy_set_header Host $host;
  15.         proxy_redirect off;
  16.     }
  17.  
  18.     location /static/ {
  19.         alias /var/www/django/static/;
  20.     }
  21.  
  22.     location /media/ {
  23.         alias /var/www/django/media/;
  24.     }
  25.  
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement