PHP-FPM - vesta creates different backend ports for different sites?
Posted: Wed Mar 23, 2016 7:13 pm
Hi!
First of all some infos about my system:
Debian 8, VestaCP (Nginx + PHP-FPM, no Apache)
I thought about adding multi-php support (php7 for some of my sites) with the help of templates. The idea was to simply set different ports for different version (e.g. php5 - 9000, php7 - 9001). I'm sure that would work just fine but that's not what i'm asking for.
I discovered that vesta uses php-fpm "backend" templates
and inside the default.tpl you find the directive:
So i wanted to search for the setting "backend_port". I assumed it would be somewhere inside the vesta folder, set to the standard port 9000. I wasn't able to find it in a config file, but i could find it in a piece of source code. %backend_port% gets "calculated" everytime it is needed by the count of the config files inside the $pool folder. So i went on the search for the $pool folder...
Inside the pool.d folder are config files for all of my sites. Each config file was created by filling the template, so each file has a listen directive like
Each site has a different port starting at 9000, going up (e.g. 9001, 9002, 9003, ...).
Why can't they all just use the same port?
I consider changing the template from
to
-flasher
First of all some infos about my system:
Debian 8, VestaCP (Nginx + PHP-FPM, no Apache)
I thought about adding multi-php support (php7 for some of my sites) with the help of templates. The idea was to simply set different ports for different version (e.g. php5 - 9000, php7 - 9001). I'm sure that would work just fine but that's not what i'm asking for.
I discovered that vesta uses php-fpm "backend" templates
Code: Select all
found at: /usr/local/vesta/data/templates/web/php5-fpm
Code: Select all
listen = 127.0.0.1:%backend_port%
Code: Select all
found at: /etc/php5/fpm/pool.d
Code: Select all
listen = 127.0.0.1:port
Why can't they all just use the same port?
I consider changing the template from
Code: Select all
listen = 127.0.0.1:%backend_port%
Code: Select all
listen = 127.0.0.1:9000