2024-08-31 14:53:30 +02:00
|
|
|
events {}
|
|
|
|
|
|
|
|
http {
|
|
|
|
server {
|
|
|
|
listen 80 default_server;
|
|
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
index index.html;
|
|
|
|
gzip on;
|
|
|
|
gzip_disable "msie6";
|
|
|
|
|
|
|
|
location = /favicon.ico { access_log off; log_not_found off; }
|
|
|
|
|
2024-09-01 21:40:23 +02:00
|
|
|
location / {
|
|
|
|
proxy_pass http://django:8000;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-Host $server_name;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_redirect off;
|
2024-08-31 14:53:30 +02:00
|
|
|
}
|
|
|
|
|
2024-09-02 12:54:38 +02:00
|
|
|
location /static/ {
|
|
|
|
alias /usr/share/nginx/html/static/;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /media/ {
|
|
|
|
alias /usr/share/nginx/html/media/;
|
|
|
|
}
|
|
|
|
|
2024-08-31 14:53:30 +02:00
|
|
|
}
|
|
|
|
}
|