Is a php5-fpm.conf file necessary for running PHP-FPM on Apache?

September 10, 2016 107 views
PHP Ubuntu

I am confused whether creating a php5-fpm.conf file at /etc/apache2/conf-available/php5-fpm.conf is really required to run php-fpm with Apache on Ubuntu 14.04

This answer on D.O and this article on say this is required.

However, this article for Debian 8 and this article for Debian 7 on Linode both instruct to add the <IfModule mod_fastcgi.c> code only to /etc/apache2/mods-enabled/fastcgi.conf

Can someone here running Apache on Ubuntu 14.04 clarify which of these methods is correct? I doubt Linode would have those tutorials running on their site if the instructions are incorrect.

1 Answer

The file name makes no difference. In the Linode guides you are first copying an example file and then modifying it. Apache does not care which file contains these settings but the block with <IfModule mod_fastcgi.c> should only be needed once across all your active configuration files. In other words, either method is correct as long as you don't do both at once.

Have another answer? Share your knowledge.