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

Posted September 10, 2016 2.9k views

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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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.