Welcome! Log In Create A New Profile

Advanced

Re: How does 'locate' work?

October 22, 2009 12:38AM
On Thu, Oct 22, 2009 at 3:50 AM, GAZ082 <nginx-forum@nginx.us> wrote:
> 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:
>
if you're using latest development version, try specifying the
location without trailing slash

-    location /public/documents/ {
+ 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
>
>
>



--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Subject Author Posted

How does 'locate' work?

GAZ082 October 21, 2009 04:50PM

Re: How does 'locate' work?

Maxim Dounin October 21, 2009 07:38PM

Re: How does 'locate' work?

Jeff Waugh October 21, 2009 08:16PM

Re: How does 'locate' work?

Peter A Leonov October 22, 2009 03:12AM

Re: How does 'locate' work?

Artifex Maximus October 22, 2009 07:58AM

Re: How does 'locate' work?

Maxim Dounin October 22, 2009 09:30AM

Re: How does 'locate' work?

GAZ082 October 22, 2009 01:05PM

Re: How does 'locate' work?

Maxim Dounin October 22, 2009 02:00PM

Re: How does 'locate' work?

GAZ082 October 22, 2009 09:24PM

Re: How does 'locate' work?

Maxim Dounin October 23, 2009 02:50AM

Re: How does 'locate' work?

edogawaconan October 22, 2009 12:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 312
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready