Welcome! Log In Create A New Profile

Advanced

Digest authorization problem

Posted by thup 
Digest authorization problem
October 30, 2014 12:23PM
Hello!
I have trouble setting up the digest module [http://wiki.nginx.org/HttpAuthDigestModule] for even the simplest case. Hope someone can help me..

I followed the installation instructions, stating nginx version 1.0.x should be used, so I use 1.0.15, hoping I can use later versions after an initial test.
After installation, I get the following response on nginx -V

nginx version: nginx/1.0.15
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
configure arguments: --add-module=/home/ubuntu/Nginx/nginx-1.0.15/digest/nginx-http-auth-digest-master/

So I guess it got installed correctly.

I then create the user 'foo' with password 'bar', in the 'hidden' realm by using htdigest.

Finally, I start nginx with the following config:

events {
worker_connections 1024;
}

http {
index index.html;

server {
root html;

location / {
}

auth_digest_user_file /etc/nginx/.htdigest;

location /private{
auth_digest "hidden";
}
}
}


I can browse to localhost and am allowed to see the nginx welcome message. I then browse to localhost/private and is prompted for username and password in "hidden" and type in my 'foo' and 'bar', but is rejected.

Can someone tell me why?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready