expires off not applying

Erik Karulf erik at karulf.com
Fri Apr 20 11:36:53 MSD 2007


Oh, and I remembered why I didn't use that (much cleaner) syntax like what
you provided.

"proxy_pass" may not have URI part in location given by regular expression,
> or inside the "if" statement, or inside the "limit_except" block


-Erik

On 4/20/07, Erik Karulf <erik at karulf.com> wrote:
>
>
>
> On 4/20/07, Igor Sysoev <is at rambler-co.ru> wrote:
> >
> > On Mon, Apr 16, 2007 at 09:20:46PM -0500, Erik Karulf wrote:
> >
> > >        if ($request_filename !~* "^.+.(php|php3)$") {
> > >           root   /www/forums.example.com/ <http://arcade.com/ >;
> > >           expires    30d;
> > >           break;
> > >        }
>
> You should use
> >
> >      location ~ .\.(php|php3)$ {
> >         proxy_pass http://127.0.0.1:8080/;
> >         expires    off;
> >      }
>
>
> Hi Igor
> Thanks for the help (and amazing webserver). I am trying (and perhaps I am
> misinterpreting the variable) to route based on the name of the file on the
> server side. The result is the server will notice that the file being called
> when you go to http://forums.example.com/ is actually
> /www/forums.example.com/index.php (through the index argument above). The
> goal is that I have a bunch of subdirectories that have index.php's, I
> would prefer not having to set those locations statically into the config
> file and instead have a regular expression evaluated per request.
> I do not know if this is possible, but it is my goal.
>
> Cheers!
> -Erik
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20070420/31025e61/attachment.html>


More information about the nginx mailing list