Hello. I just upgraded ISPC to 3.1.13 and the usual update + full-upgrade for the underlying Debian 9. Since some of the sites I host still require php5 and the distro only supplies 7.x, I installed php5.6 from packages.sury.org . Too bad now I can only use Mod-PHP mode, because trying to activate PHP-FPM results in a .vhost.err file and if I try to use that as vhost apcache2ctl reports the error in subj. I already tried to delete the link from sites-enabled and tools->resync but nothing changed. I also tried deleting the vhost file (to be sure the only content is what ISPC puts there). Same result. After solving this I'll have to dig how to switch PHP version on vhost-by-vhost basis... But since it's a production server I can't experiment too much Tks for any hints.
So you upgraded Debian 8 to Debian 9? Have you also done all the setups described in Perfect Server Guide for Debian 9? On my ISPConfig 3 running on Debian 9 I can use PHP-FPM and Fast-CGI PHP modes and choose the PHP version I want for each website. I can also choose other PHP modes but then the website uses default PHP, I can not change the version. Also: the PHP you installed most recently becomes the Default PHP. To change that to the original default on Debian 9, uses update-alternatives. The default PHP of the operating system has to remain at the original version. To fix that, run these commands: update-alternatives --config php update-alternatives --config php-cgi On Debian 9: Choose PHP 7.0, on Debian 8, choose PHP 5.6 in the dialog that appears.
Tks for the fast answer. Actually the system was originally a Debian 6 or 7, IIRC. Then it got updated. I followed "the perfect server" guide only for the initial setup, then just run updates. Now I'm re-checking the guide, but it's not easy (I didn't install Bind or a webmail package, so I have to carefully check every step). Moreover it's a master-slave cluster, and that's extra complexity...
I followed the guide (removing the unneeded parts) on both servers and had to purge & reinstall a large number of php packages (including php7.2-cli and many modules) because a lot of /etc/php/7.x/ files were missing (nearly all the modules and cli/ folder). I thought that ISPC autodetected available PHP versions, but I've now seen that I have to manually configure 'em in System tab so that's "solved". But if I resync the websites, I still get the FastCgiExternalServer error And I can't understand where it comes from, since there are no other definitions with the same "path"...
Forgot to say: # a2enconf php5.6-fpm Conf php5.6-fpm already enabled # a2enconf php7.2-fpm Conf php7.2-fpm already enabled # update-alternatives --config php Sono disponibili 3 scelte per l'alternativa php (che fornisce /usr/bin/php). Selezione Percorso Priorità Stato ------------------------------------------------------------ * 0 /usr/bin/php7.2 72 modalità automatica 1 /usr/bin/php5.6 56 modalità manuale 2 /usr/bin/php7.0 70 modalità manuale 3 /usr/bin/php7.2 72 modalità manuale Premere Invio per mantenere il valore predefinito[*] o digitare il numero della selezione: # update-alternatives --config php-cgi Sono disponibili 3 scelte per l'alternativa php-cgi (che fornisce /usr/bin/php-cgi). Selezione Percorso Priorità Stato ------------------------------------------------------------ * 0 /usr/bin/php-cgi7.2 72 modalità automatica 1 /usr/bin/php-cgi5.6 56 modalità manuale 2 /usr/bin/php-cgi7.0 70 modalità manuale 3 /usr/bin/php-cgi7.2 72 modalità manuale Premere Invio per mantenere il valore predefinito[*] o digitare il numero della selezione: I even tried modifying manually the vhost file (obv. I saved it in a backup before tampering and then restored it) by commenting out the FastCgiExternalServer lines and it seems to work after restarting Apache (HOW IS IT POSSIBLE?). phpinfo() returns "FPM/FastCGI" as server API and I see a "php-fpm: master process (/etc/php/5.6/fpm/php-fpm.conf)" process that spawned two "php-fpm: pool web3" processes (web3 is the correct user for that vhost). And I can even select different PHP versions for different vhosts: how can it select the correct daemon to connect to if the FastCgiExternalServer line is not there??? BTW my Apache is "Apache/2.4.25 (Debian) mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.9 mpm-itk/2.4.7-04 Phusion_Passenger/5.0.30 mod_python/3.3.1 Python/2.7.13 OpenSSL/1.0.2l" Any hints (given that I can't start from scratch, being a production "cluster")? I'm *really* confused -- but at least now it seems it's working... more or less!
Not understanding Italian, I can not be sure but it looks like your default PHP version is 7.2. For Debian Stretch it should be 7.0, that is the version ISPConfig supports on that OS. Use Code: LANG=C update-alternatives --config php-cgi to get output in english.
Changed (after posting I kept trying various ideas and today it defaulted to 5.6). Code: # LANG=C update-alternatives --config php-cgi There are 3 choices for the alternative php-cgi (providing /usr/bin/php-cgi). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/php-cgi7.2 72 auto mode 1 /usr/bin/php-cgi5.6 56 manual mode * 2 /usr/bin/php-cgi7.0 70 manual mode 3 /usr/bin/php-cgi7.2 72 manual mode Press <enter> to keep the current choice[*], or type selection number: # LANG=C update-alternatives --config php There are 3 choices for the alternative php (providing /usr/bin/php). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/php7.2 72 auto mode 1 /usr/bin/php5.6 56 manual mode * 2 /usr/bin/php7.0 70 manual mode 3 /usr/bin/php7.2 72 manual mode Press <enter> to keep the current choice[*], or type selection number: Apart breaking OsTicket (the version I currently have does not support php 7.x, that's why I'm currently keeping it at 5.6) nothing changed in the .vhost file: it still ends up in 'err' file being created because of: Code: AH00526: Syntax error on line 73 of /etc/apache2/sites-enabled/100-my.site.org.vhost: FastCgiExternalServer: redefinition of previously defined class "/var/www/clients/client1/web1/cgi-bin/php-fcgi-*-80-my.site.org"
My guess is that you might have used certbot or letsencrypt with apache plugin on the shell instead of using the letsencrypt functionality in ispconfig. The certbot program has a known bug, it copies vhost files to insert some lines but does not take care that not all apache directives in a vhost file may be copied, that way, it duplicates and therefore breaks apache setups. Check the folder /etc/apache2/sites-enabled/ I guess that there is a second file for my.site.org in there.
Nope. I'm sure I never used certbot on this server, since the only vhost that's there uses (and ever used) a "classic" certificate. But to be 100% certain: Code: # ls -l totale 0 lrwxrwxrwx 1 root root 39 mar 17 2014 000-apps.vhost -> /etc/apache2/sites-available/apps.vhost lrwxrwxrwx 1 root root 35 dic 29 2015 000-default.conf -> ../sites-available/000-default.conf lrwxrwxrwx 1 root root 43 mar 17 2014 000-ispconfig.conf -> /etc/apache2/sites-available/ispconfig.conf lrwxrwxrwx 1 root root 44 mar 17 2014 000-ispconfig.vhost -> /etc/apache2/sites-available/ispconfig.vhost lrwxrwxrwx 1 root root 53 set 17 13:27 100-my.site.org.vhost -> /etc/apache2/sites-available/my.site.org.vhost # Forgot to say: I even searched for the "path" after FastCgiExternalServer, and it only was in that vhost (appearing twice becouse the symlink).
Hmm, really strange. Did you try to stop apache, then check with ps aux that really no apache processes are there anymore, and then start it again. if there are still apache processes when stopped, then kill these processes.
I have an idea. Please check apache2.conf file, I guess is that the sites-enabled directory is included twice there now.
Done just now: Code: # service apache2 stop; ps aux|grep apache ; service apache2 start root 29072 0.0 0.0 12780 952 pts/1 S+ 12:55 0:00 grep apache I really don't understand what's wrong...
Missed it, but now I checked: Code: # grep sites- apache2.conf # `-- sites-enabled # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/ IncludeOptional sites-enabled/ But I found it in a .conf file! ARGH!!! A simple Code: grep -r sites-enabled /etc/apache2 would have helped. Could be useful for others (given they find this thread). Tks a lot for the support!