upstream django_project {
|
|
server localhost:8000;
|
|
}
|
|
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name reymota.lag *.reymota.lab;
|
|
root /www/data/;
|
|
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;
|
|
}
|
|
|
|
location /static/ {
|
|
alias /app/wsgi/static/;
|
|
}
|
|
|
|
location /media/ {
|
|
alias /app/wsgi/mediafiles/;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|