• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

php-fastcgi - ALL domains

podman99

Basic Pleskian
Hi,

Is there any risks or downside to having all of my vhosts setup to use PHP as FastCGI rather than an apache module?

Is there any CPU boost to doing this?

And .... most importantly, how can I apply this new configuration to ALL of my vhosts and if possible remove the apache module option. (I know that once moved to fcgi I can run a2dismod php5 and it will stop apache loading it.)
 
Hi podman99,

FastCGI is better if your php websites have significant web requests load.
As for change PHP handler for existent domains - this is not trivial task
 
Thanks Alexey,

I have nearly 1000 Domains on that server, some with fastcgi enabled and some set to apache module.

Do you have a command line I can run which would include all of my domains... I know the one domain command is

/opt/psa/bin/domain --update localdomain.blah -php_handler_type fastcgi

However, all of my domains are in the plesk database, do you have a nice one liner which would work this magic :)
 
After doing a server migration I needed all the new sites to be running under fastcgi

So I did

UPDATE `hosting` SET php_handler_type = 'fastcgi'

in the "psa" database.

Then re-built all the apache configs using:

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

Then restarted apache

service apache2 restart

doneski

edit: make sure you delete the existing "apache" sessions in /var/lib/php/sessions/ otherwise any active php scripts with those sessions will be unable to write to them any more
 
Last edited:
Back
Top