Welcome! Log In Create A New Profile

Advanced

Configure auth_basic with Nginx and Passenger

August 12, 2011 04:18AM
I'm trying to set up a basic authentication with Nginx.

My server configuration look like that:

server {
listen 80;
server_name DOMAIN;
root /var/www/web-front-dev/current/public;
error_log /var/log/nginx/web-front-dev-error.log;
access_log /var/log/nginx/web-front-dev-access.log;
passenger_enabled on;
client_max_body_size 100M;

location / {
passenger_enabled on;

auth_basic "Restricted";
auth_basic_user_file /var/www/web-front-dev/shared/simple_authentication_user_file;
}
}

The content of simple_authentication_user_file is simply:
a:b


After having restarted everything, I keep having an error while trying to logging to my domain (I checked that I enter 'b' correctly hmm hmm):

2011/08/10 16:10:13 [error] 26768#0: *1 user "a": password mismatch, client: IP, server: DOMAIN, request: "GET / HTTP/1.1", host: "DOMAIN"

I even put a chmod 777 to simple_authentication_user_file to see if it could be a problem without any success.

Could anyone suggest me something to check?
Subject Author Posted

Configure auth_basic with Nginx and Passenger

vincentp August 12, 2011 04:18AM

Re: Configure auth_basic with Nginx and Passenger

Maxim Dounin August 12, 2011 05:18AM

Re: Configure auth_basic with Nginx and Passenger

vincentp August 12, 2011 12:03PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 38
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready