jeudi 28 janvier 2021

Nginx: Finding the location of specific folder

Using nginx on my website, am trying to exclude https://www.example.com/folder1 from basic auth. But the problem I don't know folder1 to which location block it belongs, so then I can exclude it.

Trying to find the folder name in the root directory (like below) doesn't work, since it return so many results with the same name in different directories.

find /root_dir/ -iname folder1 

And excluding just the folder name as location as below doesn't work as well:

   location ^~ /folder1/ {
        auth_basic      "off";
        allow all;
    }

Any specific way to find https://www.example.com/folder1 to which location block it belong?

Thanks!




Aucun commentaire:

Enregistrer un commentaire