Auth_basic 500 error

Michael Shadle mike503 at gmail.com
Thu Jul 9 22:32:01 MSD 2009


try the full path to the htpasswd file. it's probably trying to read
from the nginx config path.



On Thu, Jul 9, 2009 at 11:08 AM, <nginx at tomvalentine.net> wrote:
> Hello,
>
> I can not seem to get auth basic to work, my configuration works fine
> with everything else, but if I enable authorisation, I get a 500
> Internal Server Error
>
> I think the key error is the Readfile() error, but I have no idea what
> it means or how to fix it.
>
>  From nginx.conf
>
> location / {
>        index  index.html index.htm index.php;
>        auth_basic private;
>        auth_basic_user_file htpasswd;
> }
>
> If anyone can help, thanks!
> By the way, I am using nginx/0.7.61 on Windows Vista, and the error
> happens in both Firefox/Opera
>
> Tom
>
> Attached is part of my log file
>
>
>
>
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http request line: "GET / HTTP/1.1"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http uri: "/"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http args: ""
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http exten: ""
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http process request header line
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Host: localhost:88"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "User-Agent:
> Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1) Gecko/20090624
> Firefox/3.5 (.NET CLR 3.5.30729)"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Accept:
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Accept-Language:
> en-gb,en;q=0.5"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Accept-Encoding:
> gzip,deflate"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Accept-Charset:
> ISO-8859-1,utf-8;q=0.7,*;q=0.7"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Keep-Alive: 300"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Connection:
> keep-alive"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Authorization: Basic
> dG9tOmhramhmc2RsZmpo"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Pragma: no-cache"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header: "Cache-Control:
> no-cache"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http header done
> 2009/07/09 17:01:45 [debug] 1348#504: *3 event timer del: 320: 1614849850
> 2009/07/09 17:01:45 [debug] 1348#504: *3 generic phase: 0
> 2009/07/09 17:01:45 [debug] 1348#504: *3 add cleanup: 018BD910
> 2009/07/09 17:01:45 [debug] 1348#504: *3 generic phase: 1
> 2009/07/09 17:01:45 [debug] 1348#504: *3 test location: "/"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 using configuration "/"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http cl:-1 max:1048576
> 2009/07/09 17:01:45 [debug] 1348#504: *3 generic phase: 3
> 2009/07/09 17:01:45 [debug] 1348#504: *3 post rewrite phase: 4
> 2009/07/09 17:01:45 [debug] 1348#504: *3 generic phase: 5
> 2009/07/09 17:01:45 [debug] 1348#504: *3 add cleanup: 018BD92C
> 2009/07/09 17:01:45 [debug] 1348#504: *3 generic phase: 6
> 2009/07/09 17:01:45 [debug] 1348#504: *3 generic phase: 7
> 2009/07/09 17:01:45 [debug] 1348#504: *3 access phase: 8
> 2009/07/09 17:01:45 [debug] 1348#504: *3 access: 0100007F FFFFFFFF 0100007F
> 2009/07/09 17:01:45 [debug] 1348#504: *3 access phase: 9
> 2009/07/09 17:01:45 [error] 1348#504: *3 ReadFile() failed (38: Reached the
> end of the file), client: 127.0.0.1, server: localhost, request: "GET /
> HTTP/1.1", host: "localhost:88"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http finalize request: 500, "/?" 1
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http special response: 500, "/?"
> 2009/07/09 17:01:45 [debug] 1348#504: *3 http set discard body
> 2009/07/09 17:01:45 [debug] 1348#504: *3 HTTP/1.1 500 Internal Server Error
> Server: nginx/0.7.61
> Date: Thu, 09 Jul 2009 16:01:45 GMT
> Content-Type: text/html
> Content-Length: 193
> Connection: close
>
>





More information about the nginx mailing list