A list of CWP WebServer Errors and their fixes

403 Forbidden Error

This is mostly caused by ModSecurity. ModSecurity is an Apache module that offers extra security to your website. However, it may block access to your website with outdated rules.

To turn it off, access your CWP dashboard, Click Security on your side panel then Click ModSecurity.

Other causes could be the incorrect location of the .include file and incorrect Apache permissions. Check Apache logs by running the following command:

tail /usr/local/apache/domlogs/domain.log
tail /usr/local/apache/domlogs/domain.error.log

Replace the domain with your website

500 Internal Server Error

The most common causes are:

PHP version has been defined in .htaccess, but it has not been installed in CWP. Ensure the PHP version defined in the file has been installed. You can install it by clicking PHP Settings, and then clicking PHP Version Switcher.

Options have been defined in the .htaccess file. You need to edit the file and remove the line starting with Options. Then refresh your website.

The current PHP version is not working well with your website code. You can change the PHP version and reload your website to see if it works.

Permission issue, especially if error logs cite “End of script output before headers“. Fix permissions by clicking User Account then click Fix Account Permission:

502 Bad Gateway

PHP-FPM may be down. You can try to reload the service and test to see if the error is fixed.

systemctl restart php-fpm.service

There may be a limited number of php_fpm processes, which limits PHP-FPM from working properly. You can use the Webserver Configuration Editor to edit the PHP-FPM template. The default is 4, but you can increase it to 20.

503 Service Unavailable

The specified version of php-fpm is not installed and the website has been set to use it. You can install the specific version required for your website to work.

The error_log may cite: FCGI: attempt to connect to Unix domain socket /opt/alt/php-fpm56/usr/var/sockets/wwwener.sock (*) failed. Rebuild webservers and tail log: /var/log/cwp/webservers.log

If in the error log this is the error:

touch: cannot touch '/home/USERNAME/.quota-check': Permission denied

Then the folder /home/Username has incorrect permissions. Fix the Account Permissions as guided at error 500.

504 GATEWAY TIMEOUT

This is probably related to Apache or php-fpm not responding. You can try restarting Apache or the php-fpm version you are using:

systemctl restart php-fpm.service
systemctl restart apache2.service

Was this article helpful?

Related Articles

Leave A Comment?