Welcome! Log In Create A New Profile

Advanced

Re: What's fastcgi_param scope

Jakub Zalas
March 24, 2011 06:24AM
On Mar 24, 10:24 am, Maxim Dounin <mdou...@mdounin.ru> wrote:
> Hello!
>
> On Wed, Mar 23, 2011 at 04:34:38PM -0700, Jakub Zalas wrote:
> > Hi,
>
> Just a side note: use "location = /foo/bar" instead.

Actually I need a regexp here. I just simplified my example.

> As soon as you did internal redirect (with rewrite) -
> configuration in this location no longer applies.  Instead
> configuration in destination location will be used.

This explains a lot. Thanks!


> See above.  Solution is to write explicitly what you want to
> happen instead of using internal redirects, i.e. something like
> this:
>
>     location = /foo/bar {
>         fastcgi_pass 127.0.0.1:9000;
>         include /etc/nginx/fastcgi_params;
>         fastcgi_param SCRIPT_FILENAME /var/www/$host/web/app.php;
>         fastcgi_param _ROUTING__route foo;
>         ...
>     }
>
> Maxim Dounin
>
> p.s. The only thing which survives internal redirect is variables.  
> Theoretically you may rewrite your config to set some variables
> before rewrite and then use appropriate fastcgi_param in .php
> location.  But it's not going to scale well and not recommended.

Thank you. Your suggestions helped me a lot.


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

What's fastcgi_param scope

Jakub Zalas March 24, 2011 04:14AM

Re: What's fastcgi_param scope

Maxim Dounin March 24, 2011 05:26AM

Re: What's fastcgi_param scope

Jakub Zalas March 24, 2011 06:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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