How to view web server logs in Plesk

While old versions of Plesk provided access to simply download log files, newer releases (version 12.5+), include a completely revamped log viewer that’s actually quite handy! It will provide you with apache logs, nginx logs and PHP logging all in the same interface.

Why would you want to view the logs?

You might want to view your web server (apache or nginx) logs for a number of reasons. Here’s just a couple of ’em!

  • You’re getting a web server error (e.g.: 404, or 502) when visting a webpage that should be working, and you want to see a more detailed error
  • You want to monitor visitors to your website in real time
  • When saving a setting or page, you get an error or the page never loads

Monitoring logs in Plesk 12.5 and newer

  1. Log in to Plesk
  2. Choose “Logs” under the domain for which you wish to view the log entries
  3. You’ll find the most recent entries at the *bottom* of the list. Oldest are at the top.
  4. You can use the “Real Time” button in the upper left to see new entries appended to the bottom as visitors are accessing your site.

If you’re not seeing the logging you expected here, you may need to enable debug mode in your application. Here’s how to do so with common web apps:

 Don’t forget to disable debug mode after you’ve found and resolved your issue otherwise your site will likely experience higher load (IO particularly) and the debug log files will likely take up *much* more space on the account.

Filtering/Searching logs in Plesk

In the upper right corner you can filter which logs you’re seeing by clicking the arrow beside “All Logs”. For example, if you’ll be monitoring traffic in real time, you can either leave it as is to see accesses and errors, or only check off the logs with the word “access” in them to avoid seeing errors and warnings. On the other hand, if you’re trying to troubleshoot an error, then you want to avoid seeing ‘access’ entries and only see errors, so check off only those that have the word ‘error’ in them.

You may also wish to filter by error code. For example if, when visiting the page you’re having trouble with, you get an error 502, look for the text box at the top of the list that says “Code” and enter “502”. When the log listing refreshes, you should now be seeing only those log entries that resulted in a 502 error code.

What do I do with these log entries?

Take a look at what shows in the list of log entries after filtering them, and see which of those might correspond with the action you or your visitors are taking which results in an error. For example, if you attempted to login to your site 5 minutes ago and it presented a 403 error, take a look at the point in the logs from 5 minutes ago and see what log entries match.

 Tip: keep an eye out for timezone differences! The bottom of the log represents the most recent entries and should roughly match your current time. So if the most recent log entry says 10:31 am and your clock shows 11:31am, you’ll need to adjust by an hour when searching for specific log entries.

The log entry will very likely reveal more details than the web server error page does. You can then use these more descriptive errors by searching our knowledgebase, or searching google to find a solution. If you can’t find a solution with a search for the provided error text, you can also create a support ticket and include the log entry there (please be sure to only include the latest entry, if it repeats) and we’ll point you in the right direction.

Examples:

Jordan is a computer, security, and network systems expert and a lover of all things web and tech. Jordan consults with project management for software companies. Jordan is a founder and managing partner at Websavers Inc.

Leave a Comment