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
How to view and monitor logs in Plesk 12.5+
- Log in to Plesk
- Choose “Logs” under the domain for which you wish to view the log entries
- You’ll find the most recent entries at the *bottom* of the list. Oldest are at the top.
- 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:
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.
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.
- Here’s the most common solution for 403 forbidden errors.
- And here’s how to troubleshoot Gateway errors like 502.
- Solving 500 errors is here.
Benign Log Entries
These are examples of log entries that are safe to ignore:
2019-04-24 18:37:23 Error 22.214.171.124 404 GET /wp-content/plugins/bbpowerpack/assets/js/swiper.min.js.map HTTP/1.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 76.3 K Apache SSL/TLS access 2019-04-24 18:37:23 Error 126.96.36.199 404 GET /wp-content/plugins/contentstudio-plugin-master/_inc/main.css.map HTTP/1.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 76.3 K Apache SSL/TLS access 2019-04-24 18:37:23 Error 188.8.131.52 404 GET /wp-includes/js/tinymce/skins/lightgray/skin.min.css.map HTTP/1.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 76.2 K Apache SSL/TLS access 2019-04-24 18:44:49 Error 184.108.40.206 404 GET /wp-content/plugins/bbpowerpack/assets/js/swiper.min.js.map HTTP/1.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 90.3 K Apache SSL/TLS access
These are safe to ignore because they are .map files which are not essential to the operation of your website and instead are used to help debug when using minified files. If you’re curious, this article describes what map files are used for.
PHP warnings are good to pay attention to only when you’ve run out of all other options. If you’ve got other troubleshooting info to go on, definitely start with that first. Here’s what a PHP warning will look like in the logs:
2019-04-24 18:37:11 Warning 220.127.116.11 AH01071: Got error 'PHP message: PHP Warning: A non-numeric value encountered in /var/www/vhosts/<domain>/httpdocs/wp-content/plugins/bbpowerpack/modules/pp-logos-grid/includes/frontend.js.php on line 35', referer: / Apache error