fastcgi_param in server context does not work

Tomasz Pajor nikon at puffy.pl
Wed Sep 23 09:57:20 MSD 2009


>> When I set fastcgi_param in server context it is not set, if in
>> location it is set.
>> Wiki says it should work in http, server, location context.
>>     
>
> Please note that wiki also says:
>
> <quote>
> Directives not set are inherited from the outer level. Directives 
> set in current level clear any previously defined directives for 
> the current level.
> </quote>
>
> Note that this is standard behaviour for all array-type directives 
> (fastcgi_param, proxy_set_header, access_log, error_log and so on).
>   
Yes I agree but there is no active fastcgi_param SITE in location context.
>   
>> server {
>>    listen 80;
>>    server_name .landingpage.dev;
>>    access_log off;
>>    error_log /var/log/nginx/landingpage.log;
>>
>>    root /vhosts/landingpage/public;
>>    charset utf-8;
>>
>>    fastcgi_index index.php;
>>    fastcgi_param SITE my_site;
>>
>>    location / {
>>        try_files $uri $uri/ @fallback;
>>        fastcgi_pass unix:/var/run/spawn-fcgi.sock;
>>        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
>>        #fastcgi_param SITE my_site;
>>        include fastcgi_params;
>>    }
>>
>>    location @fallback {
>>        fastcgi_pass unix:/var/run/spawn-fcgi.sock;
>>        fastcgi_param SCRIPT_FILENAME $document_root/index.php;
>>        #fastcgi_param SITE my_site;
>>        include fastcgi_params;
>>    }
>> }
>>     





More information about the nginx mailing list