Submitted by Lucian on Mon, 05/18/2020 - 10:33
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
Submitted by andreychek on Mon, 05/18/2020 - 22:26 Comment #1
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.