Comment 8 for bug 1411030

Revision history for this message
B. (b-deactivatedaccount-deactivatedaccount) wrote :

https://httpd.apache.org/docs/trunk/mod/mod_proxy_fcgi.html

14.04 LTS has Apache 2.4.7 so you cannot use this :

<FilesMatch "\.php$">
    # Requires Apache 2.4.9 or later
    SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/"

    # Requires Apache 2.4.10 and later
    SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>

So with 14.04 LTS you need to
1. Configure each VirtualHost with
   ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/your_path_to/htdocs/$1
2. In PHP5-FPM, use TCP instead of Unix Domain Socket (/etc/php5/fpm/pool.d/www.conf)
   listen = 127.0.0.1:9000

The alternative is to use mod_fastcgi but it's part of multiverse
(disabled by default /etc/apt/sources.list)

See also
http://events.linuxfoundation.org/sites/events/files/slides/AC2014-FastCGI.pdf

16.04 LTS is out but not all PHP applications are compatible with PHP 7
(like ibm_db2 is not yet ready https://bugs.php.net/bug.php?id=69852)