Include order and variables definition in configuration

Francis Daly francis at daoine.org
Mon Feb 24 22:46:57 UTC 2014


On Mon, Feb 24, 2014 at 11:39:39PM +0100, B.R. wrote:

Hi there,

> server {
>     include fastcgi.conf # Default configuration coming with a Debian
> ...
>     location ~^/index\.php {
>         fastcgi_split_path_info ^(/index\.php)(/.*)$;
>     }

> Will the FastCGI SCRIPT_FILENAME variable value take into account the
> value of $fastcgi_script_name after fastcgi_split_path_info has been called
> or will it be resolved when the fastcgi.conf file is included?

That seems fairly straightforward to check.

What does the debug log say?

Or the tcpdump of the traffic between nginx and the fastcgi server?

Or the fastcgi server logs, if you can see them?

(It's the one that you would expect it to be, based on
fastcgi_split_path_info being useful.)

What it actually comes down to is the time at which variables are
evaluated -- and in general, it's "the first time they are needed".

Cheers,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list