How to Exclude Basic Auth from Nginx Subdomain

us flag

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.

sv flag
Please post your config... nginx -T
us flag

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 :

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.