Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've added password protection to a lot of my domain via nginx by adding:

    auth_basic            "Restricted";
    auth_basic_user_file  /usr/ssl/htpasswd;

to the nginx vhosts.

I log all errors to log files in an effort to eradicate all errors but I get a ton of "no user/password was provided for basic authentication" errors in my log files as a result of the password protection.

I would like to tell nginx not to log those errors.. is there a directive to do that? I've looked but haven't found it yet...

If you know then please tell me. Thanks!

share|improve this question

1 Answer 1

It is loggeg on the most basic error level. check the source code: http://lxr.nginx.org/source/src/http/modules/ngx_http_auth_basic_module.c

Line 141

It cannot be disabled.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.