OS: ubuntu 16.04 ISPConfig 3 with nginx ---------------- I have configured Additional PHP version (7.1 and 7.2) under System however when I change the PHP-FPM version under a domain name the system only moves the config file from /etc/php/7.X/fpm/pool.d to the appropriate PHP version but doesn't adjust the actual nginx vhost. On the other side if I choose the default PHP version then it does adjust the nginx vhost with the correct PHP version so it doesn't seem to be a permission issue. The settings under FastCGI and PHP-FPM also looks correct since it actual moves the vhost config from pool.d so I'm out of ideas here. Can somebody advise? Thanks, Andrew
The nginx vhost file does not need to be changed, the socket path is the same, no matter which PHP version the website uses. Just a different PHP process is listening on that socket.
Its not being moved unfortunately. For example this is what we have in the nginx vhost: location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php7.0-fpm/web31.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } and the socket stays in php7.0-fpm doesn't move to /var/lib/php7.1-fpm/web31.sock for example and the nginx config doesn't change either. I can confirm that ISPConfig do something with the nginx vhost since this line change - name of the file - whenever we adjust the PHP version: location ~ \.php$ { try_files /7400f10dd4909fa48ce7c33b850460bf.htm @php; } Additionally there is only php7.1-fpm and php-7.0-fpm inside /var/lib but no php-7.2-fpm while its also correctly installed.
That's ok, as I mentioned above, the socket stays the same. You can not see in vhost file which PHP version is used by a vhost as the vhost does not change, the path is always /var/lib/php7.0-fpm/web31.sock, no matter which actual PHP FPMprocess is handling PHP of that site as /var/lib/php7.0-fpm/ is the system wide socket directory for all PHP versions. The 7.0 in the path is not an indicator for the PHP version. If you want to see which PHP version is used by a site, then put a info.php filee with phpinfo() command into the webdir of the site and open the URL in a browser.
hmm that's interesting so how can 2 different site use 2 different PHP versions with the same socket?
Each site has it's own socket file, compare two sites, you will see that the number in the filename web31.sock (here 31) differs.