Check configuration routine is wrong, just an issue with PHP-FPM

My opinion is that the routine for “Recheck Configuration” is wrong

because not only it should check if PHP-FPM service is installed/available/running

but even if

mod_proxy
mod_proxy_fcgi

are enabled (this for sure)

not only, you should check and/or suggest not to enable

mod_proxy_balancer mod_lbmethod_byrequests mod_proxy_http

because (maybe only balancer…not sure) if not properly configured could crash Apache that refuses to start…

here CentOS 7 + Apache 2.4.6
it doesn’t start if those modules are loaded

what are the implications, otherwise:

  • you check the configuration and you think all is good BUT IS NOT

  • you set the virtual servers to use PHP FPM instead of fcgid, but indeed they are not using it at all…

  • Apache syntax is even wrong because ProxyPassMatch needs mod_proxy… (httpd -t)

  • at the next reboot Apache won’t start…troubles

and also, you shouldn’t allow users to choose fpm mode on the virtual server Website Options if mod_… are not enabled

you could keep it greyed out together with an explanatory string or tooltip

OR
when user chooses the fpm mode, according to the OS, you check the .conf for loaded modules.
If not loaded, you uncomment/add the correct loading strings, graceful restart Apache and so on…

thanks

This would be better as a ticket in the issue tracker. Several of these point out bug-like behavior in Virtualmin (and this is why we’re still callin PHP-FPM support beta, so we can collect reports about stuff like this!). :wink:

I’ve created a ticket for it here: https://www.virtualmin.com/node/51845

Hello Joe :slight_smile: you’re right…next time I’ll report there

thank you