server { listen 80; server_name {{ ansible_host }}; location /static/ { alias {{ home_folder }}/iac_app/static/; } location /media/ { alias {{ home_folder }}/iac_app/media/; } location / { proxy_pass http://localhost:8000; 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; } }