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.
- Login to your cPanel.
- Under the Metrics section, click on Raw Access.
- Place a checkmark beside Archive logs in your home directory at the end of each stats run every 24 hours.
- 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.
- Click on Save.
- With your new settings saved, now click on Go Back.
- 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.
- Under the Archived Raw Logs section you can click on older archived logs to download them to your computer.
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.