40 lines
829 B
Nginx Configuration File
40 lines
829 B
Nginx Configuration File
|
|
worker_processes auto;
|
||
|
|
|
||
|
|
events {
|
||
|
|
worker_connections 1024;
|
||
|
|
}
|
||
|
|
|
||
|
|
http {
|
||
|
|
include mime.types;
|
||
|
|
default_type application/octet-stream;
|
||
|
|
|
||
|
|
sendfile on;
|
||
|
|
keepalive_timeout 180;
|
||
|
|
gzip on;
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name _;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
proxy_pass http://django:8005;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /static/ {
|
||
|
|
alias /usr/share/nginx/static/;
|
||
|
|
expires 30d;
|
||
|
|
access_log off;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /media/ {
|
||
|
|
alias /usr/share/nginx/media/;
|
||
|
|
expires 30d;
|
||
|
|
access_log off;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|