Welcome! Log In Create A New Profile

Advanced

Re: fastcgi_param in server context does not work

Tomasz Pajor
September 23, 2009 04:14AM
> On Tue, Sep 22, 2009 at 10:57 PM, Tomasz Pajor <nikon@puffy.pl> 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.
>
So there is no way to create such a configuration:

# fastcgi.conf
root /vhosts/landingpage/public;
charset utf-8;

fastcgi_index index.php;

location / {
try_files $uri $uri/ @fallback;
fastcgi_pass unix:/var/run/spawn-fcgi.sock;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
}

location @fallback {
fastcgi_pass unix:/var/run/spawn-fcgi.sock;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
include fastcgi_params;
}

# landingpage.conf
server {
listen 80;
server_name .site1.landingpage.dev;
access_log off;
error_log /var/log/nginx/site1.landingpage.log;

fastcgi_param SITE site1;
include fastcgi.conf;
}

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;
}
Subject Author Posted

fastcgi_param in server context does not work

Tomasz Pajor September 22, 2009 11:24AM

Re: fastcgi_param in server context does not work

mike September 22, 2009 11:30AM

Re: fastcgi_param in server context does not work

Maxim Dounin September 22, 2009 12:04PM

Re: fastcgi_param in server context does not work

Tomasz Pajor September 23, 2009 02:02AM

Re: fastcgi_param in server context does not work

mike September 23, 2009 02:36AM

Re: fastcgi_param in server context does not work

Tomasz Pajor September 23, 2009 04:14AM

Re: fastcgi_param in server context does not work

Tomasz Pajor September 23, 2009 05:52AM

Re: fastcgi_param in server context does not work

mike September 23, 2009 06:18AM

Re: fastcgi_param in server context does not work

Maxim Dounin September 23, 2009 07:12AM

Re: fastcgi_param in server context does not work

mike September 23, 2009 12:56PM

Re: fastcgi_param in server context does not work

Maxim Dounin September 23, 2009 01:34PM

Re: fastcgi_param in server context does not work

mike September 23, 2009 01:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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