switching apache from mod_php to php-fpm

NOTE: This is a Work In Progress post, published in note form for now, will revisit at later date.

steps to move apache away from mod_php and onto php-fpm

sudo yum remove php56w
sudo yum install php56w-fpm

sudo nano /etc/php-fpm.d/www.conf
listen =
;listen = /run/php-fpm/www.sock

sudo nano /etc/httpd/conf.d/virtualhost.conf
# configure default php-fpm version

#SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
#SetHandler "proxy:unix:/run/php-fpm/www.sock"
SetHandler "proxy:fcgi://"

systemctl start php-fpm
systemctl enable php-fpm

apachectl configtest
systemctl restart httpd

php logs in: /var/log/php-fpm

Tags: , , ,

Enough of me, let me know your thoughts below...