Remove "php_admin_value engine Off" if Apache mod_php is turned off

We never use the Apache mod_php (run as Apache's user) option, so decided to completely turn it off. However, in that case Apache fails with syntax error indicating to lines that contain:

php_admin_value engine Off

Manually removing all occurrences of the above line restarts Apache successfully. So I guess the php_admin_value option is specific to Apache mod_php only. Please do not make Virtualmin add the above line if there is no Apache mod_php on the system.

Status: 
Closed (works as designed)

Comments

Assigned: Unassigned ยป
Joe's picture
Submitted by Joe on Sun, 10/28/2018 - 14:56 Pro Licensee

If mod_php is disabled when a domain is created, Virtualmin will not add any mod_php directives.

That said, if mod_php is disabled after creation, you do have to manually remove them from existing virtual hosts...though, a re-check config or validate virtual servers might do it for you, I haven't tested (but Jamie has made it surprisingly smart about stuff like that in recent years).

Virtualmin 7 will not enable mod_php, by default, during installation, so this will become less of an issue. I tried to make that change in Virtualmin 6, but got too much push back, but I'm just gonna accept the ire of a few old-timers who like the old ways and remove it from the default going forward...nobody recommended mod_php anymore, and hasn't for like a decade, so it's going away (I mean, it'll still be there for at least a couple more major releases of Virtualmin, but it won't be in the default install).