August 14, 20178 yr have now successfully a default froxlor + apache2 + mod_apache + php7 running. the problem is now that some php webapps are not supporting php7. i read the debian9 can run multiple php version and i installed php 5.6 with apt-get install apt-transport-https curl https://packages.sury.org/php/apt.gpg | apt-key add - echo 'deb https://packages.sury.org/php/ stretch main' > /etc/apt/sources.list.d/deb.sury.org.list apt-get update https://pehapkari.cz/blog/2017/03/27/multiple-php-versions-the-easy-way/ the manual is for nginx. i want now to run all virtual host with the default mod_php apache2 setting from froxlor but for some virtualhosts use another php handler like php5.6-cgi or php5.6-fmp. there so many different setting possible and with the decaying search quality it difficult to find a staring point
August 14, 20178 yr Multiple php Versions can be used using fcgid (Apache only) as you can define the PHP binary to be executed.
August 15, 20178 yr Author thanks, its working, i used a combination of proxy_fcgi and php-fpm install : apt-get install php5.6-fpm php5.6 activate: a2enmod proxy_fcgi proxy and in froxlor in the text box Own vHost-settings of the domain settings i added: <FilesMatch "\.php$"> SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock|fcgi://foo.com/" </FilesMatch>
August 15, 20178 yr 3 minutes ago, veto said: and in froxlor in the text box Own vHost-settings of the domain settings i added: <FilesMatch "\.php$"> SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock|fcgi://foo.com/" </FilesMatch> Or even better, go to fpm settings, at the bottom, and just activate "use proxy_fcgi"....Or else you won't have the socket run by the user and you will have read/write problems cause of owner/group mismatch
August 16, 20178 yr Author the activation of fpm and the than the proxy_fcgi made my php-sites unaccessible. i will try this now with new a server
August 16, 20178 yr 2 hours ago, veto said: i will try this now with new a server So, you gonna try the exact same things on a new machine and expect something else to happen? Why not first check logs and vhosts and configs etc.?
August 16, 20178 yr Author not the same. its working for this one php5.6 webapp for now. no production site on the new server so peace of mind. i think i did not install libnss-mysql (required for FCGID/php-fpm/mpm-itk) on the first server.
August 16, 20178 yr 1 minute ago, veto said: i think i did not install libnss-mysql (required for FCGID/php-fpm/mpm-itk) on the first server. Error log would've told you that (unknown user for example)
August 16, 20178 yr Author i got this error: Tue Aug 15 18:26:32.621996 2017] [proxy:error] [pid 31544] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/apache2/fastcgi/froxlor.pa\ nel-serverdomain.com-php-fpm.socket (*) failed [Tue Aug 15 18:26:32.622037 2017] [proxy_fcgi:error] [pid 31544] [client 1.47.132.48:8651] AH01079: failed to make connection to backend: httpd-UDS [Tue Aug 15 18:27:04.808228 2017] [mpm_prefork:notice] [pid 29580] AH00171: Graceful restart requested, doing restart so i linked /var/lib/apache2/fastcgi/froxlor.pa\ nel-foo.com-php-fpm.socket to /var/run/php/php5.6-fpm.sock to login to froxlor again and disable the proxy-fcgi with fpm
August 16, 20178 yr You know that froxlor itself creates the pool-configs for fpm and with them the sockets...please check your pool-configs (are they being generated to the correct location and included?); check the domains webserver vhosts, etc.etc.etc.
August 16, 20178 yr Author thanks, but same error [Wed Aug 16 09:46:26.503876 2017] [proxy_fcgi:error] [pid 24298] [client 61.19.42.229:1739] AH01079: failed to make connection to backend: httpd-UDS [Wed Aug 16 09:46:53.687903 2017] [proxy:error] [pid 24300] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/apache2/fastcgi/foo.com-php-fpm.socket (*) failed maybe because i don't have libapache2-mod-fastcgi in stretch anymore but i have libapache2-mod-fcgid
August 16, 20178 yr stretch uses MOD_PROXY...also, as said before, check VHOSTS and POOL-CONFIGS (or even provide them here) - also verify that these generated files are being included correctly...
August 22, 20178 yr I'm testing out Froxlor/Stretch right now, and this procedure worked for me for multiple PHP versions: - add Debian's/Ubuntu's PHP maintainer repository apt-get install apt-transport-https curl https://packages.sury.org/php/apt.gpg | apt-key add - echo 'deb https://packages.sury.org/php/ stretch main' > /etc/apt/sources.list.d/deb.sury.org.list apt-get update apt-get install php5.6-cgi php7.1-cgi You may change the default php with: update-alternatives --config php As i use fcgi+apache 2.4+suexec the rest is easy: remove the immutable from the fcgi-starter you wish to change to a different version, and edit the starter to use a different one: chatt -i /path/to/starter edit the starter and change exec /usr/bin/php-cgi -c /path/to/conf to exec /usr/bin/php-cgi5.6 -c /path/to/conf As Debian delivers 7.0, you should have the choice of 5.6, 7.0 and 7.1 binaries. It would be nice to have this as an option within froxlor, but right now you have to re-edit all non-default files when froxlor rebuilds them. BTW: libnss-mysql works in stretch (source build, maridb dev files required).
August 22, 20178 yr Why change the starter-file manually? it will be overwritten by the cronjob anyway. If you use FCGID you can just create another php-configuration with /usr/bin/php-cgi5.6 as php-binary and assign it to the domains you want to use php-5.6 with
Archived
This topic is now archived and is closed to further replies.