I have the following problem: I am trying to put a Django application with a gunicorn server on my VPS running Nginx. My nginx configuration is as follows:
upstream app_name { server unix:/path/to/socket/file.sock fail_timeout=10; } server { listen 80 default_server; listen[::]:80 default_server ipv6only=on; root /webapps/; server_name my_hostname.com; location / { proxy_set_header Host $http_host; } location /appname/ { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://app_name; }
}
However, when I go to my_server.com/appname/ , I constantly get a 404 error. I'm still new to Nginx, could someone point me in the right direction, how to set the proxy password for the path /appname/ ? I should note that when the place for /appname/ replaced with / , the django application works fine.
django proxy nginx gunicorn
Konrad WΔ
sowicz
source share