Symptoms
You get a 403 error when browsing your site, and an error similar to the following is logged in the Apache error log.
2023-04-12 13:54:52.440677 [ERROR] [3994220] [T0] [203.0.113.2:53219:HTTP2-1#APVH_domain.tld:443] MIME type [application/x-httpd-ea-php73] for suffix '.php' does not allow serving as static file, access denied!
Description
This issue occurs when the version of LiteSpeed running on the server is older than 6.1 or when the site's .htaccess
file has a PHP handler for a PHP version not installed on the server.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Update LiteSpeed to the most recent version.
/usr/local/lsws/admin/misc/lsup.sh
- Open the site's
.htaccess
file in your preferred text editor. - Comment out any
AddHandler
lines for any PHP version not used by the site.# AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
- Save the changes and exit the text editor.