0

I am in the process of upgrading a web server from using the slower, resource-intensive mod_php, and all has been well, until I noticed that PHP 7.1 is running successfully using only the php7.1-fpm package (from ondrej/php repository), without libapache2-mod-fastcgi installed. This behavior persists after restarting the system (Ubuntu 16.04.1) as well.

It was previously my understanding that Apache required both packages to be installed for the php7.1-fpm to work. However, this is evidently incorrect. Should I install the package libapache2-mod-fastcgi as well? On this same note, should I consider installing apache2-mpm-worker instead of (or in addition to) the standard apache2 package?

I understand that this is more of a best practices question, but I am looking more for if I am preparing a recipe for disaster.

UPDATE: I haven't yet found any difference in performance, but I still feel that there might be a technical reason that many "tutorials" and such suggest the aforementioned packages all in pair, especially at high loads or high traffic instances...

1234567
  • 163
  • 1
  • 10
  • Wait, what is the "problem" you are having? – Michael Hampton Feb 05 '17 at 20:16
  • @MichaelHampton, it's not necessarily a "problem"..... yet. However, everywhere I look, it is recommended that one installs both `libapache2-mod-fastcgi` and `php7.1-fpm` (or the respective package for a desired version), when converting to use FPM instead of `mod_php`. That being said, I noticed that it works when using only `php7.1-fpm`. Is this supposed to happen? I want to be sure that I'm not replicating a recipe for disaster to potentially hundreds of servers. – 1234567 Feb 05 '17 at 22:45
  • 90% or more of what's on the Internet is crap. That claim doesn't even make any sense, so I'm not sure why it would be repeated everywhere. If it works, don't worry about it. – Michael Hampton Feb 05 '17 at 23:14

1 Answers1

0

Adding modules to Apache that you don't need will only serve to increase the attack vector and increase (slightly) the memory footprint.

Apache's proxy/balancer can speak the FCGI protocol.

Ed Neville
  • 193
  • 4