Known as the FastCGI process Manager, PHP-FPM is an improved phpfastcgi implementation with more useful features for handling high-load servers and Web sites. Some of these features are listed below: New features have advanced process management capabilities with elegant (graceful) Start/stop options. Known as the FastCGI process Manager, PHP-FPM is an improvement in PHP FastCGI implementation with more useful features for handling high-load servers and Web sites. Some of these features are listed below: New features have advanced process management capabilities with elegant (graceful) Start/stop options. You can listen to multiple ports and use multiple PHP configurations with different user identities/groups. Error log records. Supports upload acceleration. This is especially useful for the ability to end requests and erase all data while processing some time-consuming tasks. Supports both dynamic and static child process rebirth. IP address restrictions are supported. In this article, I'm going to talk about installing PHP-FPM over Nginx and Apache on a CentOS 7 server running CPanel 11.52 and EA3 (Easyapache), and how to manage these installed multiple PH through CPanel P-FPM instance. Before we start the installation, let's look at the prerequisites for installation. Prerequisites Enable MODPROXYFCGI module Enable mpm_event since we are installing PHP-FPM to a EA3 server, we need to run Easyapache to compile Apache to enable these modules. You can refer to my previous writing about how to install Nginx on the Apache server as a reverse proxy document to understand the installation of Nginx. Here, I'll briefly describe those installation steps again. For details, you can refer to the article I wrote earlier (how to configure the Nginx reverse proxy on the CentOS 7/cpanel server). Step 1: Install the Epel warehouse Step 2: Install the Ndeploy RPM Warehouse, which is the most important step in this installation. Step 3: Install the Ndeploy and Nginx plugins from the Ndeploy warehouse using Yum. Step 4: Enable/configure Nginx as the reverse proxy. After you complete these steps, install the PHP-FPM package for all available PHP versions of the server, and EA3 use the Remi Warehouse to install the packages. You can run this Ndeploy script to download all the packages. [Email protected] [~]#/opt/ndeploy/scripts/easy_php_setup.shloadedplugins:fastestmirror,tsflags,universal-hooksea4|2.9kb00:00:00base|3.6kb00:00:00epel/x86_64/ metalink|9.7kb00:00:00epel|4.3kb00:00:00extras|3.4kb00:00:00updates|3.4kb00:00:00 (): epel/x86_64/updateinfo| 460KB00:00:00 (2/2): epel/x86_64/primary_db running the script will install all these FPM packages for PHP 54,php 55,php 56 and PHP 70. Installedpackages[email protected][email protected][email protected][email protected] After the installation is complete, you need to enable PHP-FPM SAPI for Apache. You can run the following script to enable the PHP-FPM instance. [Email protected] [~]#/opt/ndeploy/scripts/apache_php-fpm_setup.sh enablemod_proxy_fcgi.cpleasechoose OnedefaultPHP Versionfromthelistbelowphp70php56php54php55providethe exact desired version string Hereandpress Enter:php54confgen:: Lxbloggerconfgen::blogrconfgen::saheethaconfgen::satestwhich:nocagefsctlin (/usr/local/jdk/bin:/usr/local/sbin :/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/x11r6/bin:/root/bin) info[rebuildhttpdconf] Missingownerfordomain Server1.centos7-test.com,force Lookup to rootbuilt/usr/local/apache/conf/httpd.conf okwaitingfor "httpd" to restart Gracefully...waitingfor "httpd" to initialize ..... Finished. It will ask which PHP version you need to run as the default version of the server, you can enter those details, and then continue to configure and generate the virtual host file for the existing domain name. I chose PHP 54 as the default PHP-FPM version on my server. CONFIRM-PHP-FPM Although the server is configured with PHP-FPM 54, we can modify PHP-FPM instances by CPanel for individual domain names. I'll show you how to modify the PHP-FPM instance for individual domains through CPanel. After installing the Nginx plugin, the CPanel of your domain name will have an nginx webstack icon, you can click the icon to configure your Web server. I have logged into one of my CPanel to configure the appropriate WEB server. Please look at these. Nginxicon1 Now you can configure the Web server for the selected primary domain as needed (here, I have selected the primary domain saheetha.com). I have continued through the Automation configuration option because I do not need to add any manual settings. Nginx_auto_proxy when the Nginx configuration is complete, you can select the PHP-FPM instance for your domain name here. Php-fpm1php54php55 as you can see in the, the default php-fpm on my server is PHP 54, and I'm just about to change the PHP-FPM instance of my domain name to PHP 55 alone. After you modify the PHP-FPM for your domain, you can confirm it by visiting the Phpinfo page. Internet + times, always want to keep learning, together with the thousand front php,dream It Possible. More PHP Related technologies Please search thousand-front php, do the real self, with conscience to do education.
How to enable PHP-FPM multiple instances of Apache