Configuring Log Rotation


Browse by products and services

  • Applies to: DV
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: Plesk administrator access
  • Applies to: DV 4.0
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: Plesk administrator access

Overview

All connections to the Web server and requests for files that were not found on the server are registered in log files. These log files are analyzed by the statistical utilities running on the server, which then present graphical reports on demand. You may want to download these log files to your computer for processing by third-party statistical utilities, or view their contents for web server debugging purposes.

To prevent these log files from growing too large, you should enable automatic cleanup and recycling of log files. 

Instructions

Plesk

1. Log in to the Plesk Control Panel. You should be in the Websites & Domains section.

2. Find the domain that you'd like to work with and click SHOW MORE.

3. Select Logs from the drop-down menu. 

4. You should now see a list of log entries. Click the drop-down menu in the top right corner and select Manage Log Files.

5. Click Log Rotation.

6. A Plesk pop-up window will give you a few different options for managing log rotation. If you have a high traffic site, it may be more efficient to use the default By size setting rather than By time, as logs may otherwise become very large. 

7. Once you've configured your setup and clicked OK, you should receive a green confirmation banner.

cPanel

1. Log in to WHM and select cPanel Log Rotation from the options under Service Configuration, which is located in the scroll bar on the left. You can also navigate to the proper section by typing "log rotation" into the search box at the top. 

2. You should now have a list of log files that are currently being rotated. Modify which logs are being rotated and click save.

3. You can modify the size of rotated files by navigating to Tweak Settings and clicking on the Stats and Logs tab. There is also a direct link on the log rotation configuration page. 

4. Change the value of Log rotation size threshold to whatever you require and click Save. 

Resources

Plesk Log Rotation docs
cPanel Log Rotation docs

Instructions for Legacy Plesk

  1. Log into the Plesk Control Panel for your domain.

    If you log into Plesk with the admin user, you will be in the Server Administration Panel by default. To get to the Control Panel, click on Domains, then on the Control Panel link next to your domain.

    You can also create a user that will log into the Control Panel by default, which will save you a few clicks on day-to-day webmaster tasks. See Control Panel user.

  2. From the Home page, click on Websites & Domains.

  3. Expand the options menu for the domain you want to configure your log rotation for.
    779_Expand_Plesk_Panel_11.5
  4. Select Logs.
  5. Click on the Log Rotation icon.
  6. You may now turn on log rotation and make any edits to your settings, then click "OK" to save your changes.