Files
hoopscout/nginx/nginx.conf

52 lines
1.2 KiB
Nginx Configuration File

worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 20m;
upstream django_upstream {
server web:8000;
}
server {
listen 80;
server_name _;
location /static/ {
alias /var/www/static/;
expires 30d;
access_log off;
}
location /media/ {
alias /var/www/media/;
expires 30d;
access_log off;
}
location /health/ {
proxy_pass http://django_upstream/health/;
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 / {
proxy_pass http://django_upstream;
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;
}
}
}