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/; } }