• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Disable PHP for a Domain?

Azurel

Silver Pleskian
What is the correct way to disable PHP for a (CDN-)Domain?

Disable PHP in PHP-Settings ends with automatic download the php-file. I want PHP files in CDN, but I want something like a 404 or 403 by access. It should not execute and it should not download the php-file.

That is not working
<Directory /var/www/vhosts/example.com/httpdocs/>
php_admin_value engine Off
</Directory>
Error: 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
But I think this will end in download the php-file?
 
Last edited:
Probably in this form
<Directory /var/www/vhosts/example.com/httpdocs/>
<FilesMatch "\.php$">
Order allow,deny
Deny from all
</FilesMatch>
</Directory>
 
Last edited:
Back
Top