What's the story with php-fpm on centos 6? There's a php-fpm rpm for centos 6 in epel but other essential mods like mod_fastcgi or mod_proxy_fcgi seem to be missing from the repos I'm usually using. Need a push in right direction. Thanks.
Remi repo provides it? 22.8.2014 20.59 kirjoitti "Александр Кириллов" nevis2us@infoline.su:
What's the story with php-fpm on centos 6? There's a php-fpm rpm for centos 6 in epel but other essential mods like mod_fastcgi or mod_proxy_fcgi seem to be missing from the repos I'm usually using. Need a push in right direction. Thanks.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Does it? There's mod_fastcgi in rpmforge but I don't feel quite comfortable with packages from this repo.
Eero Volotinen писал 2014-08-22 22:46:
Remi repo provides it? 22.8.2014 20.59 kirjoitti "Александр Кириллов" nevis2us@infoline.su:
What's the story with php-fpm on centos 6? There's a php-fpm rpm for centos 6 in epel but other essential mods like mod_fastcgi or mod_proxy_fcgi seem to be missing from the repos I'm usually using. Need a push in right direction. Thanks.
On 08/22/2014 11:27 PM, Александр Кириллов wrote:
Does it? There's mod_fastcgi in rpmforge but I don't feel quite comfortable with packages from this repo.
Just check the spec file from the src.rpm and see if you find something suspicious. Or, if you have a bit more spare time, check the spec file and just rebuild it.
Mihamina Rakotomandimby писал 2014-08-23 08:49:
On 08/22/2014 11:27 PM, Александр Кириллов wrote:
Does it? There's mod_fastcgi in rpmforge but I don't feel quite comfortable with packages from this repo.
Just check the spec file from the src.rpm and see if you find something suspicious. Or, if you have a bit more spare time, check the spec file and just rebuild it.
Thanks, Mihamina! That's what I did but I'm not sure I'll be using this mod on production servers.
On 22 Aug 2014, at 21:27, Александр Кириллов nevis2us@infoline.su wrote:
Does it? There's mod_fastcgi in rpmforge but I don't feel quite comfortable with packages from this repo.
Eero Volotinen писал 2014-08-22 22:46:
Remi repo provides it? 22.8.2014 20.59 kirjoitti "Александр Кириллов" nevis2us@infoline.su:
What's the story with php-fpm on centos 6? There's a php-fpm rpm for centos 6 in epel but other essential mods like mod_fastcgi or mod_proxy_fcgi seem to be missing from the repos I'm usually using. Need a push in right direction.
mod_fastcgi is extremely old and dead. If I remember it is superseded by mod_fcgid which became part of the Apache core and actively maintained (or something, sry this is from memory many years ago)
mod_proxy_fcgi is also very much dead. Not updated since 2006.
EPEL has mod_fcgid in it and you should absolutely use it, along with suexec, if you need fcgi process mamagement for php-cgi.
When using php-fpm you do not need any of the above modules as the above modules are fpms that interact with cgi processes having fastcgi support (such as php-cgi).
php-fpm IS an fpm, written by PHP team. If you want to use php-fpm as the fpm you merely need to use mod_proxy as-is since php-fpm is pretty much a stand alone server - you just proxy your php request to it with ProxyPass.
For simple servers like pure PHP you may benefit greatly speed wise from Nginx, and support from PHP software (WordPress / Drupal etc) is now very wide. For huge feature sets, modules, and variety, Apache though.
Hope this helps. I'd been running LAMP stacks for over 6 years and LNMP for last 2.
Jason
Sorry let me fix this. 7am is clearly too early for brain function :( Just ignore my last mess email
On 23 Aug 2014, at 06:59, Jason Woods devel@jasonwoods.me.uk wrote: mod_proxy_fcgi is also very much dead. Not updated since 2006.
When using php-fpm you do not need any of the above modules as the above modules are fpms that interact with cgi processes having fastcgi support (such as php-cgi).
mod_fastcgi is gone. That's now fcgid.
mod_proxy_fcgi is not dead. It's too new for centos 6 though.
It needs apache 2.4 and centos has lower (2.2?) I think. Thus you'd need to build apache yourself or find packages in rpm forge or something as it requires apache 2.4 and this module for proxy to fcgi.
You can see the module doesn't exist for 2.2 here: http://httpd.apache.org/docs/2.2/mod/ But does for 2.4: http://httpd.apache.org/docs/2.4/mod/
To summarise, what you want to do will need apache 2.4. Or just use the old school php-cgi and mod_fcgid.
Other option is nginx and fastcgi_pass. Benefit here is you can use unix socket if php-fpm is local to drop the TCP overhead
For simple servers like pure PHP you may benefit greatly speed wise from Nginx, and support from PHP software (WordPress / Drupal etc) is now very wide. For huge feature sets, modules, and variety, Apache though.
Sorry for confusion. No more emails this early. Coffee first.
Jason
mod_fastcgi is gone. That's now fcgid.
mod_proxy_fcgi is not dead. It's too new for centos 6 though.
It needs apache 2.4 and centos has lower (2.2?) I think. Thus you'd need to build apache yourself or find packages in rpm forge or something as it requires apache 2.4 and this module for proxy to fcgi.
You can see the module doesn't exist for 2.2 here: http://httpd.apache.org/docs/2.2/mod/ But does for 2.4: http://httpd.apache.org/docs/2.4/mod/
To summarise, what you want to do will need apache 2.4. Or just use the old school php-cgi and mod_fcgid.
Other option is nginx and fastcgi_pass. Benefit here is you can use unix socket if php-fpm is local to drop the TCP overhead
Thanks, Jason! I've been using php-cgi, mod_fcgid and suexec combo for years on my servers. Now I want to run php apps in UserDir with user credentials. This probably can be achieved with mod_fcgid and suexec but it seems like I'd need separate fcgi configs and cgi wrappers under suexec docroot for each user. If you know of a simpler way please share your experience.
On 23 Aug 2014, at 08:15, Александр Кириллов nevis2us@infoline.su wrote:
Thanks, Jason! I've been using php-cgi, mod_fcgid and suexec combo for years on my servers. Now I want to run php apps in UserDir with user credentials. This probably can be achieved with mod_fcgid and suexec but it seems like I'd need separate fcgi configs and cgi wrappers under suexec docroot for each user. If you know of a simpler way please share your experience.
To be fair you'd still need separate configs for each user even with php-fpm to set the user/group for the processes and to set the sessions path.
I always did it that way. Unique wrappers for each user and apache config for each user setting the suexec user group etc. I had shell scripts to generate them for me.
Even with nginx you need config per user but at least you don't need any wrappers - you do need a php-fpm config per user tho so it's about the same work. I shell scripted this too.
Jason
Jason Woods писал 2014-08-23 11:44:
On 23 Aug 2014, at 08:15, Александр Кириллов nevis2us@infoline.su wrote:
Thanks, Jason! I've been using php-cgi, mod_fcgid and suexec combo for years on my servers. Now I want to run php apps in UserDir with user credentials. This probably can be achieved with mod_fcgid and suexec but it seems like I'd need separate fcgi configs and cgi wrappers under suexec docroot for each user. If you know of a simpler way please share your experience.
To be fair you'd still need separate configs for each user even with php-fpm to set the user/group for the processes and to set the sessions path.
I always did it that way. Unique wrappers for each user and apache config for each user setting the suexec user group etc. I had shell scripts to generate them for me.
Even with nginx you need config per user but at least you don't need any wrappers - you do need a php-fpm config per user tho so it's about the same work. I shell scripted this too.
I suspected as much :( Seems like fpm isn't worth the effort after all though sharing the opcode cache by php-fpm workers might be interesting. Thanks a lot for your input!
I suspected as much :( Seems like fpm isn't worth the effort after all though sharing the opcode cache by php-fpm workers might be interesting. Thanks a lot for your input!
You're welcome! I'll say though that I did see a boost in response times (can't remember how much but noticeable) when I switched to fpm. So it may still be worth considering, though on CentOS 6 Nginx will be an easier setup and more maintained than rolling ones own. With SSL and official Nginx repo you'll get things like SPDY too.
Jason Woods писал 2014-08-23 12:28:
I suspected as much :( Seems like fpm isn't worth the effort after all though sharing the opcode cache by php-fpm workers might be interesting. Thanks a lot for your input!
You're welcome! I'll say though that I did see a boost in response times (can't remember how much but noticeable) when I switched to fpm. So it may still be worth considering, though on CentOS 6 Nginx will be an easier setup and more maintained than rolling ones own. With SSL and official Nginx repo you'll get things like SPDY too.
Yeah, maybe I should get out of the groove and try something new like many other fearless old farts on this list do :) Just kidding.