The Apache error log is an invaluable resource when troubleshooting issues with your website or application or on your server in general.
All apache errors / diagnostic information other errors found while serving requests are logged to this file. As such, it is one of the first places to look when a problem occurs, since it will often contain details of what went wrong and how to fix it.
Here we cover the steps to check the Apache error log on your VPS or Dedicated server in real-time to determine the cause of an issue loading your website.
Related Articles
How to SSH into VPS or Dedicated Servers
Check Error Log
IMPORTANT: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
- Access the server via SSH as the root user or using the Terminal in Root WHM
- Run the following command:
tail -f /usr/local/apache/logs/error_log | grep domain.com
REPLACE: "domain.com" with the domain of the website that is experiencing an issue.
NOTE: The tail command tells the machine to read the end of the file and display the results on the terminal. The -f flag tells the tail command to continue reading the file and output any new information in the terminal until the command is stopped. - Refresh the webpage that is not functioning properly
NOTE: If the page is experiencing an Apache-related issue, you will see the error displayed in your terminal upon reloading the page. - Review the error(s) to determine the cause of the issue
Comments
0 comments
Article is closed for comments.