How to tail the Apache Log file of a cPanel server


Finding and tailing the Apache log file of a hosted service is a common task that every server administrator has to do from time to time. But finding where these files are stored on a shared server such a cPanel is not entirely straightforward at all as control panels customise these locations to facilitate the shared hosting. Additionally googling for the answers can be problematic as you might end up find a ton of WMH information when actually you’re looking for the cPanel information.

So what exactly is the difference between WHM and cPanel?

In a nutshell WHM is the managed service, and cPanel are the individual sites. As mentioned when googling don’t include the acronym WHM but even if you don’t, you’ll still end up with a ton of useless irrelevant information. The information you will often find is detailed information around all the tens of WHM log file, copy verbatim from website to website.

This article aims to simply finding what you’re actually looking for, so that you can diagnose the website in question.

How to access the Apache log file of a website in cPanel

SSH to your cPanel.

tail -f /usr/local/apache/domlogs/

If you are experiencing a complex hosting issue and you require assistance, contact us as we would like to assist with the troubleshooting.

Why would you want to access the Apache log files on a WHM server?

At times WordPress might be running high CPU. Tailing the log file can show you xmlrpc attackers.

What other methods for seeing busy sites are there?

You could do this:

ls -l /proc/<PID>/fd
lsof -p <PID>
lsof -u <username>

Share this article

Leave a Reply

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

Scroll to Top