Is best to put the fastcgi_pass 127.0.0.1:9000
directive in the fastcgi_params
file for NGiNX, or to explicitly state it in the location for \.php$
?
Or does it not really matter?
Is best to put the fastcgi_pass 127.0.0.1:9000
directive in the fastcgi_params
file for NGiNX, or to explicitly state it in the location for \.php$
?
Or does it not really matter?
You want to put it directly in the location
block, because the fastcgi_params
file is intended to be shared by multiple blocks which can pass to a different FastCGI server. The fastcgi_params
also gets rid of the "noise" of all the paramater definitions which are not important most of the time, but the fastcgi_pass
directive is always important when dealing with configurations. Lastly, the name fastcgi_params
implies that it only contains fastcgi_param
directives -- using it for other directives will confuse others (and probably you in a couple months) trying to understand the configuration.