I'm kind of new to deploying uSWGI python apps behind nginx as a reverse proxy, but so far I have had no trouble at all.
I have a small linode where I deploy all my python webapps simultaneously. As of yesterday I had two of them running on ports 8080 and 8090, yesterday I decided to deploy a default static site on my server root. It worked as expected. This web had a basic mailing form so I rebuild my IPTABLES to allow outgoing traffic for the mail port. (This is the only main change I made) And I decided to restart the linode in order to get everything in order.
After that I restarted both web apps, but somehow one of them (which works flawlessly in the local develpment enviroment) just returns a 401 error.
I really have no clue about what it could be, I have the same app runing in heroku as well and I have no problem there.
I have run out of ideas on what this could be.
This is my server block configuration for the app
server {
# Running port
listen 80;
server_name bachmanager.com www.bachmanager.com;
#logs
access_log /var/www/BachApp/logs/access.log;
error_log /var/www/BachApp/logs/errors.log;
# Proxying connections to application servers
location / {
include uwsgi_params;
uwsgi_pass uwsgiBach;
proxy_redirect off;
proxy_set_header Host www.bachmanager.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
I have loked around but every question or post about 401 talks about how to properly use it, it seems no one is getting this error by mistake...
I'm pretty sure this is a pretty basic question, but I cannot seem to be able to figure it out.