auth_basic 500 Internal Server Error

wishmaster artemrts at
Mon Jun 24 19:18:07 UTC 2013

Hi, guys!

I am attempting to secure one subdirectory on the server with ngx_http_auth_basic_module. Unfortunately, without success. 

In log file error:

2013/06/24 22:03:05 [crit] 34189#0: *1 open() "/usr/local/etc/nginx/authpw" failed (13: Permission denied), client:, server:, request: "GET /private/ HTTP/1.1", host: ""

Part of nginx.conf:
        location ^~ /private {
        auth_basic "Closed area, sorry...";
        auth_basic_user_file /usr/local/etc/nginx/authpw;

# ls -lo ./authpw
-r--r-----  1 root  www  - 50 24 чер 21:58 ./authpw

# cat ./authpw

What I have missed?

More information about the nginx mailing list