Unable to move from fcgi to fpm

ubuntu 20.04 and the latest virt installed.

i host wordpress sites nearly exclusively…and i have yet to get a wordpress site to operate when i switch the site from fcgi to fpm. before i redo this server i would like to get all sites onto fpm but this one has me stumped. new sites of course start on fpm and have zero issues…but i have a fair amount of sites that existed long before virt switched to fpm…and they refuse to move. i can import them onto a new server and they happily run under fcgi but they will not switch to fpm…the logs just say things like directive error and client ended connection…any ideas?

Virtualmin backup and restore has many options in the form of check boxes that can be enabled or disabled. When you restore from a backup, @hescominsoon , you are keeping all the check boxes enabled and this (full restore) is causing the FPM glitch to be brought back into the system.

I suggest you do a full backup of a virtual server, then delete it from your Virtualmin system, then manually create a new virtual server with the same domain name and then do a restore with only some of the check boxes enabled - the check boxes related to database, files and users only.

Doing so might restore your WordPress website with all the content but without the FPM glitch.

Here’s the script I use to change all my domains from fcgi to fpm:

#!/bin/sh

#mkdir /var/run/php (or /run/php)
#chown -R www-data:www-data /var/run/php (or /run/php)

systemctl enable php7.4-fpm
systemctl enable php8.2-fpm
systemctl enable php8.3-fpm

/etc/init.d/php7.4-fpm restart
/etc/init.d/php8.2-fpm restart
/etc/init.d/php8.3-fpm restart

/usr/sbin/virtualmin modify-web --all-domains --mode fpm

/etc/init.d/apache2 restart

/etc/init.d/php7.4-fpm restart
/etc/init.d/php8.2-fpm restart
/etc/init.d/php8.3-fpm restart

I have several versions of php thus the extra lines.

1 Like

fpm glitch? Is this a virt issue or an fpm issue? I have tried restoring the domain in question to a new server and it restores as fcgi…so i will test that and see if there’s a way to not restore it as fcgi…

will this script operate correctly with accounts using jailkit?

The FPM glitch is a term I have used to refer to your particular situation. There is no such glitch outside of your situation.

If you follow the process of restoring the virtual server that I have outlined in my previous message, the restore options will be limited to database, file and mail. The PHP execution mode will not be restored from what it was in the backup because you have unchecked all other restore options.

Unknown, try at your own risk…