I have a basic sinatra app which is behind nginx so that I can use HTTP Basic Auth to protect it, but I get a 403 Forbidden error instead of seeing the webapp. The app works fine when I remove the HTTP Auth lines.
The configuration looks something like this:
server {
auth_basic "Restricted";
auth_basic_user_file htpasswd;
location / {
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_pass http://127.0.0.1:4567;
}
location ~ /\. {
deny all;
}
}
Would greatly appreciate any help on how to get rid of the 403 error.
I'm using nginx version 1.0.0.