Education ChannelsWHM

Enabling raw access log archiving in cPanel

This piece will cover the topic of archiving raw access logs, which allows for the examination of website requests at a later time. By default, the server updates statistics every 24-36 hours, consolidating all requests made during that time into a report that can be viewed through tools such as Awstats, Logaholic, or Webalizer.

Although the compiled statistics reports available through cPanel are generally sufficient for most cases, it’s worth noting that they wipe out the exact requests made each time they’re run. This means that if you ever need to refer back to the specific requests made on a certain day, you won’t have access to that information through the standard reports. To avoid this issue, you can opt to archive your raw access logs, which will ensure that this data is retained for future reference and manual investigation, if necessary.

If you have root access to a VPS or dedicated server, you can also enable raw access log archiving for all cPanel accounts at once.

  1. Login to your cPanel.
  2. Under the Metrics section, click on Raw Access.
    cpanel raw access logs
  3. Place a checkmark beside Archive logs in your home directory at the end of each stats run every 24 hours.
  4. Only place a checkmark beside Remove the previous month’s archived logs from your home directory at the end of each month, if you would only like to archive the current month’s logs and not keep the previous month’s logs.
  5. Click on Save.
    starting access log configuration
  6. With your new settings saved, now click on Go Back.
    go back button
  7. Under the “Download Current Raw Access Logs” section, selecting your domain will initiate the download of the most recent raw access log, which will typically display today’s activity.
  8. download recent raw logs
  9. Under the Archived Raw Logs section you can click on older archived logs to download them to your computer.
    downloading archived logs

You can refer to our article on “accessing the raw access logs in cPanel” for detailed instructions on enabling raw access log archiving for your account, as well as guidance on what to do once you’ve downloaded a raw access log.



Leave a comment

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