freekake_api/nginx.conf
2025-06-30 12:31:43 +07:00

30 lines
547 B
Nginx Configuration File

# nginx.conf
client_max_body_size 10M;
upstream django_app {
server webapp:8000;
}
server {
listen 80;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
proxy_pass http://django_app;
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/;
}
}