Differences between mod_fastcgi and mod_proxy_fcgi

Solution 1:

mod_proxy_fcgi, which is newly available in Apache 2.4, is just for this type of use case. The Apache wiki entry for PHP-FPM has some good guidance to get started.

The mod_proxy_fcgi documentation also includes specific examples for setting up PHP-FPM and the PHP documentation also has helpful information.

On the other hand, mod_fastcgi is notoriously difficult to set up and a memory hog. Additionally, mod_fcgi doesn’t support spawned CGI servers. Because PHP-FPM is managed by itself, not by Apache, mod_fcgi isn’t the best choice.