fastcgi_pass inheritance

Manlio Perillo manlio_perillo at libero.it
Wed Jan 2 17:40:03 MSK 2008


Athan Dimoy ha scritto:
> Manlio Perillo <manlio_perillo at ...> writes:
> 
>> Athan Dimoy ha scritto:
>>> Igor Sysoev <is at ...> writes:
>>>> You may describe all fastcgi stuff (fastcgi_param/etc) except fastcgi_pass
>>>> even on http level, and it will be inherited to all servers and locations
>>>> until will be overriden in them.
>>> How this can be done? I mean how to fill all fastcgi stuff on http level. 
>>> Currently I fill all of them inside a location ~ \.php$ {...} block. Can I 
> use 
>>> such a location block on http level, common for all virtual servers?
>>>
>> Yes, you can.
>>
> 
> Hmm, are you sure that location can be used inside http? I've tried but Nginx 
> replied with an error saying: "location" directive is not allowed here...
> 

location can not be used inside http block, but you can use the fastcgi 
directives here.


The only problem is with fastcgi_param.
I'm not sure, but if you do something like:

http {
    fastcgi_param x y;
    fastcgi_param a b;

    server {
        location / {
            fastcgi_param c d;

            fastcgi_pass ...
        }
    }
}


then the FASTCGI parameters passed to the FASTCGI server at / will 
receive only the c:d pair.

At least this is what happens with wsgi_var in wsgi module.

> Athan
> 
> 


Manlio Perillo





More information about the nginx mailing list