HostOnNet Blog

Enable php-fpm in CentOS 7

To install php-fpm on CentOS, run

yum -y install php-fpm

Now you need to edit Apache configuration to activate php-fpm

Edit file /etc/httpd/conf.d/php.conf

vi /etc/httpd/conf.d/php.conf


SetHandler application/x-httpd-php

Replace with

SetHandler "proxy:fcgi://"

Enable php-fpm start on boot

systemctl enable php-fpm
systemctl start php-fpm

Restart Apache

systemctl restart httpd

Now if you check phpinfo(), you will see Server API changed to FPM/FastCGI.

Posted in CentOS