![enable error log in cpanel whm enable error log in cpanel whm](https://www.chociz.com/whmcs/index.php/images/kb/2_Screenshot_360.png)
This error means that permission to access the index page of the website is denied, which usually refers to incorrect permission for the index file. AH01071: Got error 'Unable to open primary script: /home/layerstacksuppor/public_html/index.php (Permission denied)\n' The error logs for a domain can also be checked from cPanel for the domain by clicking on the option named Errors under Metrics section.Īn example of an error message generated for a website in the Apache error log is shown below, the website name showing in the context of this guide is, with the cPanel username being layerstacksuppor.
![enable error log in cpanel whm enable error log in cpanel whm](https://blog.redserverhost.com/wp-content/uploads/2019/12/Screenshot_77-2-300x278.png)
# tail -f /usr/local/apache/logs/error_log # grep -i permission /var/log/apache2/error.log (Ubuntu/Debian)Ĭhecking Apache error log in WHM/cPanel serverīy default, the Apache error log in a WHM/cPanel server is located in the path /usr/local/apache/logs/error_log.Īny errors with websites hosted in the cPanel server will be logged in this error log and it can be monitored in real-time to find the cause of the error, by executing the below command. # grep -i permission /var/log/httpd/error_log (CentOS/Fedora) In the below examples, the word permission is being searched in the error log. To search for any particular word in the Apache error log, the grep command can be used as below. Ubuntu/Debian: # tail -f /var/log/apache2/error.log The logs related to the errors of the website will automatically be shown in real-time.ĬentOS/Fedora: # tail -f /var/log/httpd/error_log Once the location of the Apache error log has been found out, it can be monitored in real-time for checking on finding the cause of any error that a website is facing.įor this, execute the below commands in the server, and then browse the website having the error in a web browser. Ubuntu / Debian: # grep ErrorLog /etc/apache2/nf To find the exact location of the Apache error log, the below grep commands can be used:ĬentOS / Fedora: # grep ErrorLog /etc/httpd/conf/nf Ubuntu/Debian: /var/log/apache2/error.log.CentOS/Fedora: /var/log/httpd/error_log.This guide outlines the basic steps to find out, wherein the server, the Apache error log can be located as well as the way in which the error log can be monitored in real-time.Īpache error log, by default, can be found in the locations specified below, based on the Linux OS distribution in the server. Checking the error logs in real-time can often assist in analyzing and finding the cause of what went wrong with the website and thereby the way to fix it. In a Linux server having Apache as the webserver, the error logs of the Apache service helps considerably in troubleshooting such issues with the websites. The website showing error can be attributed to several factors, some of which may include incorrect permissions for files/folders, issues with the services serving the website, missing files, corrupted files/database, etc. There may arise situations when a website hosted in a Linux server does not work properly and shows up error messages.