How does 'locate' work?

GAZ082 nginx-forum at nginx.us
Thu Oct 22 00:50:38 MSD 2009


Hi! I want to protect a directory and its content. The directory is located in the server in the dir:

/var/www/site.com/public/documents/

So, i have:

    location /public/documents/ {
        root /var/www/site.com/;
        auth_basic            "Access restricted.";
        auth_basic_user_file   /private/pass;
}

The thing is, i've been toying with the location and root options, with and without ^ and seems that i can not frigging protect the directory. So, can someone explain me with practical examples, how does the location and root parameters work? I read the wiki and can't get it to work properly.

Thanks a LOT!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,15688,15688#msg-15688






More information about the nginx mailing list