Welcome! Log In Create A New Profile

Advanced

Re: variables in "include" for vhost specific config files

July 21, 2009 12:57PM
2009/7/21 Igor Sysoev <is@rambler-co.ru>:

> http {
>
>     # here you may set any fastcgi settings expect fastcgi_pass,
>     # and they will be inherited in all servers and locations.
>     fastcgi_index  ...
>     fastcgi_param  ...

The only negative about this is (how Maxim described it) any "array"
type configuration item like fastcgi_param will be reset if you set
this globally, but then add a new index somewhere else.

I set all my fastcgi_params globally in the past, but then I needed to
set fastcgi_param HTTPS on; just for a single server block - and what
happens is the entire set gets reset to nothing besides the HTTPS one.
I thought it would override a value (which it appears to properly) or
add a value.

Of course, one could just set fastcgi_param HTTPS off; and then just
override it on the server, but it is something to caution people
about, unless that behavior has been modified (this was recent though)

Also, I had my fastcgi_params set globally and it appears that my
Django setup (I believe it was) wanted a couple different params and
did not like me defaulting fastcgi_index index.php (which was set
globally), so I wound up doing the separate fastcgi_params config file
(I should call it php.conf) and including it inside of every location
block for php. That guarantees I can add new items like HTTPS on too -
the array structure isn't killed if it is inside of the same location
block it seems...
Subject Author Posted

variables in "include" for vhost specific config files

Kaspars July 19, 2009 01:45PM

Re: variables in "include" for vhost specific config files

Igor Sysoev July 21, 2009 05:05AM

Re: variables in "include" for vhost specific config files

mike July 21, 2009 12:57PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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