# The events block is required; We need to supply it, even if empty: events {} http { # Make Nginx serve CSS files as text/css instead of text/plain. Otherwise, # the browser does not apply styles: include /etc/nginx/mime.types; upstream django { server django:8000; } server { listen 80; # Allow file uploads up to 4 GB: client_max_body_size 4096m; location /static/ { alias /srv/static/; } location /media/ { alias /srv/media/; } location / { proxy_pass http://django; 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; } } }