http { # ... upstream lucy_webapp { server 127.0.0.1:8000; } server { listen 80; server_name _; root /home/pi/dev_lucy/Lucy/lucy_webapp; location / { index index.html; } location /staticfiles/ { alias /home/pi/dev_lucy/Lucy/lucy_webapp/staticfiles; } location /main { include /etc/nginx/uwsgi_params; uwsgi_pass lucy_webapp; uwsgi_param Host $host; uwsgi_param X-Real-IP $remote_addr; uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for; uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto; } } }