I have a nginx multi-user setup that use the same fpm config for all vhost but each vhost has his own user so I had to set a variable in the vhost config to set the fastcgi_pass path in the included file. This way the vhost config is always clean.
I've read somewhere that variable in vhost is not recommended. What do you think of this setup? It's currently working pretty well so I was wondering.
I don't see any reason why it can be slower since the recommended ways to
pass params to fastcgi is by using dynamics variables ex: fastcgi_param
The way you're setting your variable is static by the website, the value is
not dynamically linked to the request. So it might have a sight overhead
when starting the web server for parsing the config, instead of having the
full config repeated for each virtual host, but overall once the "virtual
server" is loaded into memory it's shouldn't be a problem.