1
0
clubhaus-schornbach/Deployment/Test/nginx.conf

34 lines
958 B
Nginx Configuration File
Raw Permalink Normal View History

2022-08-03 02:06:55 +02:00
upstream clubhaus_website {
server backend:8000;
}
server {
listen 80;
location / {
proxy_pass http://clubhaus_website;
# forwarding the remote ip
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE_ADDR $remote_addr;
# setting the origin always to the same value as in the docker compose file
# removes the need to set the host on different dev envs
# NEVER USE IN PRODUCTION
proxy_set_header Origin "http://internal.security";
proxy_set_header Host "internal.security";
proxy_redirect off;
# allow uploads up to 20 megabytes (like pictures)
client_max_body_size 20M;
}
# redirect static files to filesystem
location /static/ {
alias /usr/src/app/static/;
}
# redirect media files to filesystem (user uploaded files)
location /media/ {
alias /usr/src/app/media/;
}
}