fastcgi_pass inheritance

Jean-Philippe skateinmars at skateinmars.net
Wed Jan 2 19:31:09 MSK 2008


Manlio Perillo a écrit :
> 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.

I had the same 'issue' with my proxy configuration. At the http level I
include a proxy.conf file but if I change any parameter (besides
proxy_pass) on a location level all the other params are ignored, and I
muse reinclude the proxy.conf file.

> 
>> Athan
>>
>>
> 
> 
> Manlio Perillo
> 





More information about the nginx mailing list