Apache Disable PHP for a web site

To disable PHP for a web site edit VirtualHost entry of the web site and add

php_flag engine off

Restart Apache

systemctl restart apache2

Method 2

Add following code in VirtualHost entry


    SetHandler none

Restart Apache.

Method 3

Add following code to Apache VirtualHost entry


    php_admin_flag engine Off

Then restart the Apache web server. Change folder /var/www/html to your DocumentRoot directory.

Apache

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *