On Tue, Sep 22, 2009 at 10:57 PM, Tomasz P. [email protected] wrote:
Yes I agree but there is no active fastcgi_param SITE in location context.
no but the location context’s array overwrites the array that was
defined on the server level
i used to think the same thing - that it’s all key based; but
apparently it’s not. think of it like a php array, and replacing the
array with a new one. not just replacing a specific key or appending
to it.
server {
listen 80;
server_name .site2.landingpage.dev;
access_log off;
error_log /var/log/nginx/site2.landingpage.log;
fastcgi_param SITE site2;
include fastcgi.conf;
}
I’ve been going through emails, and I came up with a good solution to my
configuration, based on Igor and Maxim suggestion in Conditional
fastcgi_param thread.
Thanks!
On Wed, Sep 23, 2009 at 03:14:10AM -0700, Michael S. wrote:
i used to set fastcgi_params on the global level, but now i have a
fastcgi.conf file with all the params that i include in my location
block for php - this allows me to alter the array like one would
expect.
Note that you can’t redefine params already defined on the same
level. I.e. writing (either direct or via include)
On Wed, Sep 23, 2009 at 09:51:12AM -0700, Michael S. wrote:
Oh, wow.
To me, that seems like a bug, or at least an unwanted behavior. That
doesn’t really follow any kind of pattern I’ve ever seen.
This is how it works, and fastcgi specs do not specify intended
behaviour here. It’s up to application to select one. In it’s
turn nginx just allow admin to do whatever his application wants.
Note that this problem was already discussed on Russian mailing
list a while ago and consesus was that such situation probably
deserves warning during configuration parsing.
For now, just don’t write duplicate fastcgi_param’s if you don’t
need them and you will be fine.
i used to set fastcgi_params on the global level, but now i have a
fastcgi.conf file with all the params that i include in my location
block for php - this allows me to alter the array like one would
expect.