I had a terrible problem a few days ago. I installed updates on my ubuntu server, which is the host for about 10 websites. During the upgrade, something went wrong, and apaches mod_php turned off. As a result, PHP support disappeared, and within a few minutes (until I realized what was wrong), users were invited to download PHP scripts, instead of seeing the website. Needless to say, there is nothing worse than exposing your script sources to the whole world, especially when the credentials in the database are stored internally.
Question: How to configure apache so that this situation is not possible in the future? What lines should be added to apache2.conf so that PHP files cannot be loaded if mod_php is disabled?
security php apache
Silver light
source share