Contos 7 remi

How to Run PHP-FPM 8.0 and PHP-FPM 7.4 Simultaneously for Different Sites on Centos 7 Nginx

Running websites on different CMS or different versions of the same CMS, it is usual that some sites need PHP 7.4, others PHP 7.2 and others can work on PHP 8.0 and so on. Centos 7 now has several php-fpm packages, and this article describes how to run two or more php-fpm services and configure nginx to use certain php version for certain site.


1. Update to PHP 8 on Centos if you still did not

Check current php version

php -v
  PHP 7.4.30 (cli) (built: Jun  7 2022 08:38:19) ( NTS )