To an untrained eye, a typical log file may look like a wall of incomprehensible strings of letters and numbers. However, in reality, it’s an invaluable source of vital information and can prove critical in fixing problems and optimizing your site’s performance.
As a website owner, you will likely need to review your website’s server log files at one point or another, and the ones you will probably be most interested in are:
The access log files are created by your web server and contain vital information regarding the traffic your site generates. Every HTTP request is recorded, along with its type, status, the user’s IP, and the user agent. The raw data is generated on the server and could be useful for identifying potential technical problems and analytics purposes.
Web server error logs
Web servers go through a large number of operations, and inevitably, things don’t always go according to plan. The errors and warnings aren’t necessarily visible to the end user, but they are nevertheless logged, so website administrators can review them and take the appropriate actions.
PHP error logs
Web applications consist of thousands of lines of (mostly PHP) code. A single typo is often enough to break the entire website. PHP’s default error reporting mechanisms display warnings in the browser, but applications can be configured to log them in a file. The information in that file could be invaluable if your site slows down or crashes.
Reviewing and Downloading Your Website’s Logs in SPanel
SPanel’s goal is to simplify website management. This means, among other things, helping you review logs and troubleshoot problems without the need to rummage through directories or spend hours trying to find the correct command.
Instead, you can view and download log files straight from your browser. Here are the steps:
1. Log in to SPanel’s User Interface
The default login URL is https://[yourdomain]/spanel. This is where you manage the websites hosted on your account.
2. Click Domains
Click Domains on SPanel’s homepage.
Scroll down to the bottom where you’ll see a list of all the domains you’ve added to your SPanel User Account.
3. Click Actions and select the type of logs you want to view and download
The Actions menu next to your website’s domain gives you quick and easy access to your log files.
If you click View Access Logs or View Error Logs, a popup appears with the last 200 lines from the respective file.
With the Download button, you can save the log to your computer.
If you choose View PHP Errors, SPanel scans your domain’s document root and its subfolders for PHP error logs. If it finds any log files, it displays them in separate tabs in the popup that appears.