Apache HTTP Server 2.4 + PHP-FPM + mod_proxy_fcgi


You may use mod_fastcgi to integrate with your php-fpm.

Unfortunately, it seems not support Apache 2.4 at the moment.
Alternatively, you can use ByteInternet/libapache-mod-fastcgi

Or use mod_proxy_fcgi instead.

Configuration for DocumentRoot

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/path/to/your/documentroot/$1

For virtual hosts, please add ProxyPassMatch for each virtualhost

<VirtualHost *:80>
    DocumentRoot /path/to/your/documentroot/wordpress
    <LocationMatch ^(.*\.php)$>
        ProxyPass fcgi://127.0.0.1:9000/path/to/your/documentroot/wordpress
    </LocationMatch>
    ServerName somewhere.com
</VirtualHost>

Reference:
http://wiki.apache.org/httpd/PHP-FPM


Leave a Reply

Your email address will not be published. Required fields are marked *