0

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.

Asmodean
  • 59
  • 1
  • 1
  • 6

1 Answers1

2

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

Ajay Singh
  • 298
  • 1
  • 2
  • 12