The simple and common way to enable PHP support in Apache http server is using mod_php and
Using httpd with worker or event MPM doesn't have support for mod_php
With RHSCL various PHP versions are available, but only one mod_php can be enabled.
The solution is to use php-fpm and mod_proxy_fcgi.
But configuration, to redirect PHP script to FPM, requires to use ProxyPass(Match) which is really not simple.
As ProxyPass is evaluated in the very beginning of an http request, it don't honours alias or htaccess rules.
SetHandler is evaluated at the very end of an http request.
httpd 2.4.10 have SetHandler to proxy support which allow to use
Please consider backporting this great feature in RHEL
For memory, commit in fedora (at 2.4.9 time)
Using php-fpm with actual httpd 2.4.6 package needs use of ProxyPassMatch directive which can lead to malicious code execution.
Using the following directive:
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/path/to/your/documentroot
Malicious code injection:
/uploads/malicious.jpg/lalalaalala.php will lead php-fpm to execute malicious.jpg (source https://wiki.apache.org/httpd/PHP-FPM )
Might the SetHanlder enhancement be considered as a security enhancement and therefore backported ?
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.