Auth_basic 500 error
Tom Valentine
tom at tomvalentine.net
Fri Jul 10 00:28:31 MSD 2009
Michael Shadle wrote:
> try the full path to the htpasswd file. it's probably trying to read
> from the nginx config path.
>
Hi, I changed it to the full file path, and got the same error.
I then changed the configuration to point to a file that did not exist.
This resulted in the error:
2009/07/09 21:12:54 [error] 3820#3944: *3 CreateFile()
"C:/nginx/conf/.tpasswd" failed (2: The system cannot find the file
specified), client: 192.168.1.1, server: localhost, request: "GET
/favicon.ico?hj HTTP/1.1", host: "192.168.1.11:88"
I pointed nginx.conf back to the correct file and switched to a putty
session on my router and used wget for some testing:
wget http://:d@192.168.1.11:88/favicon.ico
--> server returned error: HTTP/1.1 401 Unauthorized (Expected)
But as soon as I add in a username to the request I got a 500 error:
wget http://fdfdf:fsdfsdfsdfsdfsdfd@192.168.1.11:88/favicon.ico
--> server returned error: HTTP/1.1 500 Internal Server Error
The only time I got a 403 error was when I was pointing nginx.conf to a
non existent file AND if I specified a username in the request:
wget http://vps:sdsd@192.168.1.11:88/favicon.ico
--> server returned error: HTTP/1.1 403 Forbidden
So it seems I can only get the authorisation to work if I don't have a
password file.
So is my password file the problem, I generated the passwords from
various sources (I tried several) including a working htpasswd file from
apache, but I would expect a 403 error, not a 500.
More information about the nginx
mailing list