I have the two lines of basic auth added in the nginx.conf.

So that all subdomain blocks under reverse proxy are password protected. But I do have a few in which I don't want it to have that.

What do I need to include in those server blocks in order to let them thru?

Thank you!

And sorry I don't know what wildcard is nor if it is applicable in this case.


There is an option to turn off on server block using auth_basic off;. Add it to the root location of each subdomain.

server {
   server_name sub.example;
   location / {
       auth_basic off;

Source : https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html#auth_basic

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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