Topic: [INFO] CentOS 7.1, httpd, php-fpm and the right handling of scripts
Hello,
With the upcomming release of CentOS 7.1, i have tested the httpd-2.4.6-31.el7.x64_86.rpm package (currently in CentOS-CR repo) with the added support for SetHandler (Redhat bug report at bugzilla.redhat.com/show_bug.cgi?id=1136290 )
I was wondering if only the SetHandler directive has been backported, or if they also backported the possibility to use unix sockets.
So i tested the following in a virtualhost:
<IfModule event.c>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm.default_vhost.socket|fcgi://localhost/"
</FilesMatch>
</IfModule>
And it works great ! Sockets declared by php-fpm listen directive work too !
This should also get rid of the hideous "AH01071: Got error 'Primary script unknown'" error which gets triggered way to easy with the ProxyPassMatch directive.
PS: i use the <IfModule event.c> directive in my virtualhosts because i left the mod_php php.conf file with <IfModule prefork.c> directive so i can easily switch between both implementations by changing the MPM and make some speed tests without having to reconfigure every vhost.