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?
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?