# vi:syntax=nginx upstream django { server backend:9000; } server { listen 80; listen [::]:80; server_name localhost; charset utf-8; location /static { alias /home/server/static; } location /admin { uwsgi_pass django; include /home/config/uwsgi/uwsgi_params; } location /api { uwsgi_pass django; include /home/config/uwsgi/uwsgi_params; } location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }