mirror of
https://github.com/tanrax/SSE-Fake.git
synced 2024-11-14 19:45:41 +01:00
Update nginx.conf
This commit is contained in:
parent
8e4dbd522d
commit
967d7fd4c4
58
nginx.conf
58
nginx.conf
@ -1,33 +1,33 @@
|
||||
events {}
|
||||
|
||||
http {
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
root /var/www;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
location /static {
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
location /media {
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
location /static {
|
||||
include /etc/nginx/mime.types;
|
||||
alias /var/www/static;
|
||||
}
|
||||
|
||||
location /media {
|
||||
alias /var/www/media;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user