Welcome! Log In Create A New Profile

Advanced

Re: confused with hiding a directory

All files from this thread

File Name File Size   Posted by Date  
nginx-0.8.42_hidden-location.patch 5.1 KB open | download Matthieu Tourne 08/03/2010 Read message
August 03, 2010 04:08PM
On Tue, Aug 03, 2010 at 12:13:55PM -0700, Matthieu Tourne wrote:

> 2010/8/3 Igor Sysoev <igor@sysoev.ru>:
> > On Tue, Aug 03, 2010 at 02:54:53PM -0400, raubvogel wrote:
> >
> >> Let's say I have a directory named conf in the root of my website I want
> >> to hide. From what I understood, if I have
> >> [code]
> >>   location /conf {
> >>     deny all;
> >>   }[/code]
> >> It will not allow anybody to see what is inside /conf. But, what if I do
> >> not want people even to know that /conf is there to begin with, while
> >> other files and directories are visible?
> >
> >    location /conf {
> >        internal;
> >    }
> >
> > nginx will return 404 as location does not exist.
> >
>
> Hi,
>
> Sometime ago I made a patch to add a "hidden" keyword.
> A hidden location is reachable only from on internal request
> (subrequest, rewrite), but won't return a 404 if a front facing client
> hits this location, instead they would get the last public location in
> the tree. ( / instead of /conf for example).
>
> This is useful if you need internal mechanisms, but redirect most of
> your traffic using a proxy_pass, and can't make assumption about the
> locations about the upstream you proxy.
> If you're interested I can update the patch for nginx 0.8.48.

location /conf {
internal;
error_page 404 = /;
}


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

confused with hiding a directory

raubvogel August 03, 2010 02:54PM

Re: confused with hiding a directory

Igor Sysoev August 03, 2010 03:04PM

Re: confused with hiding a directory

raubvogel August 03, 2010 03:13PM

Re: confused with hiding a directory

Matthieu Tourne August 03, 2010 03:18PM

Re: confused with hiding a directory

raubvogel August 03, 2010 03:38PM

Re: confused with hiding a directory

Igor Sysoev August 03, 2010 04:08PM

Re: confused with hiding a directory Attachments

Matthieu Tourne August 03, 2010 04:54PM

Re: confused with hiding a directory

Igor Sysoev August 03, 2010 04:10PM

Re: confused with hiding a directory

raubvogel September 12, 2010 06:07PM

Re: confused with hiding a directory

Matthieu Tourne September 13, 2010 07:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 306
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