{"id":857,"date":"2017-08-20T19:35:08","date_gmt":"2017-08-20T18:35:08","guid":{"rendered":"http:\/\/gavtaylor.uk\/blog\/?p=857"},"modified":"2017-08-22T16:26:41","modified_gmt":"2017-08-22T15:26:41","slug":"switching-apache-from-mod_php-to-php-fpm","status":"publish","type":"post","link":"https:\/\/gavtaylor.uk\/blog\/switching-apache-from-mod_php-to-php-fpm","title":{"rendered":"switching apache from mod_php to php-fpm"},"content":{"rendered":"<p>NOTE: This is a Work In Progress post, published in note form for now, will revisit at later date.<\/p>\n<p>steps to move apache away from mod_php and onto php-fpm<\/p>\n<p><code><br \/>\nsudo yum remove php56w<br \/>\nsudo yum install php56w-fpm<\/p>\n<p>sudo nano \/etc\/php-fpm.d\/www.conf<br \/>\nlisten = 127.0.0.1:9000<br \/>\n;listen = \/run\/php-fpm\/www.sock<\/p>\n<p>sudo nano \/etc\/httpd\/conf.d\/virtualhost.conf<br \/>\n# configure default php-fpm version<br \/>\n<filesmatch \\.php$><br \/>\n  <if \"-f %{SCRIPT_FILENAME}\"><br \/>\n    #SetHandler \"proxy:unix:\/run\/php-fpm\/www.sock|fcgi:\/\/localhost\"<br \/>\n    #SetHandler \"proxy:unix:\/run\/php-fpm\/www.sock\"<br \/>\n    SetHandler \"proxy:fcgi:\/\/127.0.0.1:9000\"<br \/>\n  <\/if><br \/>\n<\/filesmatch><\/p>\n<p>systemctl start php-fpm<br \/>\nsystemctl enable php-fpm<\/p>\n<p>apachectl configtest<br \/>\nsystemctl restart httpd<\/p>\n<p>php logs in: \/var\/log\/php-fpm<\/p>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 = 127.0.0.1:9000 ;listen = \/run\/php-fpm\/www.sock sudo nano \/etc\/httpd\/conf.d\/virtualhost.conf # configure default php-fpm version #SetHandler [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"switching apache from mod_php to php-fpm","jetpack_is_tweetstorm":false},"categories":[38],"tags":[124,157,6,320],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/posts\/857"}],"collection":[{"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/comments?post=857"}],"version-history":[{"count":3,"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/posts\/857\/revisions"}],"predecessor-version":[{"id":867,"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/posts\/857\/revisions\/867"}],"wp:attachment":[{"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/media?parent=857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/categories?post=857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gavtaylor.uk\/blog\/wp-json\/wp\/v2\/tags?post=857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}