freekake_api/nginx.conf

31 lines
571 B
Nginx Configuration File

# nginx.conf
client_max_body_size 8M;
upstream django_app {
server web:8000;
}
server {
listen 80;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
client_max_body_size 50M;
location / {
proxy_pass http://web:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}
# OPTIONAL: serve static files if needed
location /static/ {
alias /static/;
}
location /media/ {
alias /media/;
}
}