Welcome! Log In Create A New Profile

Advanced

Re: Equivalent of Apache's SetEnv Variable

August 05, 2010 03:32AM
On Thu, Aug 05, 2010 at 12:01:38AM -0700, Michael Shadle wrote:

> Yeah I expect nginx to only be aware of the filesystem it has access to. So open_file_cache saves stat calls? How do you invalidate the cache if a file is removed? Or if I put a new file that wasn't there I want it to instantly show up not 404 for a while? Apologies if you've covered this already.

open file cache entries are valid for open_file_cache_valid time, 60s
by default. If you want to cache file errors such as "not found", you may
set open_file_cache_errors on.

> On Aug 4, 2010, at 11:38 PM, Igor Sysoev <igor@sysoev.ru> wrote:
>
> > On Wed, Aug 04, 2010 at 02:48:07PM -0700, Michael Shadle wrote:
> >
> >> On Wed, Aug 4, 2010 at 2:44 PM, Ed W <lists@wildgooses.com> wrote:
> >>
> >>> However, all the default configs that I have seen for PHP setups on the
> >>> wiki, etc, seem insecure to my mind. They nearly all point *all* files
> >>> named xx.php to be processed by the your php interpreter. Coupled with
> >>> nearly all non trivial applications having some "upload" feature this allows
> >>> a gaping potential issue to upload arbitrary files named xx.php and you are
> >>> allowing arbitrary code to be uploaded...
> >>
> >> Someone just posted this on my blog:
> >>
> >> location ~ \.php$ {
> >> ....
> >> try_files $uri =404;
> >> ...
> >> }
> >>
> >> exploit http://site.ru/images/as5df3.jpeg/.php
> >>
> >> might be an interesting approach, haven't tried it yet. would this add
> >> an additional stat call or two though for every PHP request, Igor?
> >
> > Yes, it adds a stat() syscall, however, it can be eliminated with
> > open_file_cache. Note also, that it works only if nginx and php are
> > on the same host.
> >
> >
> > --
> > Igor Sysoev
> > http://sysoev.ru/en/
> >
> > _______________________________________________
> > nginx mailing list
> > nginx@nginx.org
> > http://nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

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

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

Equivalent of Apache's SetEnv Variable

Raina Gustafson July 29, 2010 12:28PM

Re: Equivalent of Apache's SetEnv Variable

Eugaia July 29, 2010 01:24PM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev July 29, 2010 01:32PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson July 29, 2010 01:34PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 03, 2010 05:08PM

Re: Equivalent of Apache's SetEnv Variable

mike August 03, 2010 05:24PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 03, 2010 07:20PM

Re: Equivalent of Apache's SetEnv Variable

mike August 03, 2010 07:38PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 03, 2010 07:52PM

Re: Equivalent of Apache's SetEnv Variable

mike August 03, 2010 08:26PM

Re: Equivalent of Apache's SetEnv Variable

Ed W August 04, 2010 05:50PM

Re: Equivalent of Apache's SetEnv Variable

mike August 04, 2010 05:52PM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 02:48AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 03:10AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 03:32AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 03:20AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 03:38AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 04:12AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 04:12AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 04:18AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 04:26AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 04:54AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 05:18AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 06:02AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 06:22AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 06:26AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 06:46AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 06:52AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 07:04AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 07:16AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 07:18AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 06:50AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 06:52AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 03:42AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 04:14AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 04:18AM

Re: Equivalent of Apache's SetEnv Variable

Cliff Wells August 04, 2010 10:48PM

Re: Equivalent of Apache's SetEnv Variable

Ed W August 26, 2010 07:12AM

Re: Equivalent of Apache's SetEnv Variable

mike August 26, 2010 07:22AM

Re: Equivalent of Apache's SetEnv Variable

Jim Ohlstein August 26, 2010 10:28PM

Re: Equivalent of Apache's SetEnv Variable

Ed W August 27, 2010 11:00AM

Re: Equivalent of Apache's SetEnv Variable

mike August 04, 2010 06:20AM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 04, 2010 10:58AM

Re: Equivalent of Apache's SetEnv Variable

mike August 04, 2010 04:04PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 04, 2010 11:14AM

Re: Equivalent of Apache's SetEnv Variable

mike August 04, 2010 04:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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