Feature req: Disable PHP altogether (for static sites)

Hi,

I need to disable PHP altogether for a site that is static. I tried to add an empty /usr/bin/phpX binary, however this did not fool Virtualmin.

How does Virtualmin actually detect available PHP versions in a system? I was thinking to add a new "php" that does nothing and select that for my static site.

(don't want the customer to be able to run PHP)

If we could make this a feature that'd be even better.

Regards!

Status: 
Active

Comments

Howdy -- disabling PHP altogether isn't a common feature request we receive, I'm not sure we'd be able to get that as a feature anytime soon, as Virtualmin is designed to enable that automatically.

However, you should be able to disable it on a case by case basis.

For that, you should just be able to edit the domain's .conf in /etc/apache2/sites-enabled, and there, comment out the lines beginning with "AddType", and end with .php.

Once you've done that, restart Apache to apply the settings.