Password protecting Rails site running on Nginx and Phusion Passenger
I want to protect my newly deployed Rails 3 app with the basic http authentication. It's running on the latest Nginx/Passenger and I'm using the following Nginx directive to protect the web root directory: location = / { auth_basic "Restricted"; auth_basic_user_file htpasswd; } htpasswd file was generated using Apache htpasswd utililty. However, after entering correct username and password I'm getting transferred to the 403 Forbidden error page. Analyzing Nginx error log revealed this: directory index of "/var/www/mysite/public/" is forbidden, client: 108.14.212.10, server: mysite.com, request