Use PHP5-FPM with Apache 2 on KVM VPS CentOs 6.8 Print this Article
If we need a high traffic website host on apache due to .htaccess rules ( which is very painfull job to encode for nginx syntax)
And you dont want to migrate from apache to nginx+php-fpm Then you can use apache …
Here we are going to tell you how you can setup apache2 with php-fpm in centos 6.7 environment.
Install Rpmforge repository to use
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum repolist yum install mod_fastcgi
now Install php-fpm
yum install php-fpm
now Edit php-fpm default pool
And find the line listen = 127.0.0.1:9000 . comment this and append with socket
listen = /var/run/php-fpm/www.sock
now change the listen.owner, listen.group & listen.mode
listen.owner = apache listen.group = apache listen.mode = 0660
now disable mod php
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.orig
now enable mod_fastcgi to do so modify the lines in file /etc/httpd/conf.d/fastcgi.conf
#Find and comment out these lines #FastCgiIpcDir /var/run/mod_fastcgi #FastCgiWrapper On #FastCgiConfig -idle-timeout 20 -maxClassProcesses 1 # add these lines at the end of file DirectoryIndex index.php AddHandler php-fcgi .php Action php-fcgi /php-fcgi Alias /php-fcgi /cgi-bin-php.fcgi FastCgiExternalServer /cgi-bin-php.fcgi -socket /var/run/php-fpm/www.sock -pass-header Authorization
now restart the services
service php-fpm start
service httpd restart
Was this answer helpful?
If you have opted crazytech india KVM VPS for hosting a high traffic wordpress website then we...
NTP is a service in unix/linux which synchronize local server time with public time (NTP)...
Some users uses plugin for enabling next page or page break button in wordpress editor. This...
A complete webserver for hosting heavy traffic php based CMS websites like wordpress, drupal etc...
Using cloudflare for your website gives so many of options and flexibility for your web. Free...
Powered by WHMCompleteSolution