I am trying to use php-fpm as I have heard it can increase performance on my webserver, and it appears to be working.. but it doesn't look like it has speeded anything up.
I ran through the following steps.
- Installed php-fpm using yum
- Configured the php-fpm to use a unix socket and set the [www] listen to apache
- Renamed 10-php.conf to 10-php.conf.disabled
- Switched mpm from mpm_prefork_module to mpm_event_module
Added the following to all my vhosts underneath the Directory setting:
# php-fpm <FilesMatch "\.php$"> SetHandler "proxy:unix:/var/run/php-fpm/php-fpm.sock|fcgi://www/" </FilesMatch>
Restarted/Started everything and enabled php-fpm on boot
I was a bit confused about mod_fcgi, mod_fastcgi and mod_php but haven't changed any of these (other than renaming 10-php.conf). I read something about mod_proxy_fcgi being the modern standard but again haven't explicitly installed or enabled it.
Is this the correct setup, or am I missing something to get any benefit?