Plesk

How to set up forced log rotation for all domains in Plesk

Question

A GDPR-related regulation prohibits storing clients' IP addresses on the server after a certain period of time. How to set up forced log rotation for all domains?

Answer

Plesk UI

  1. Login into Plesk;
  2. Go to Tools & Settings > Server Settings;
  3. Enable option Force daily log rotation for all domains and specify how long logs will be kept:
    Click Install

CLI

  1. Connect to the server via SSH or Connect to the server via RDP

  2. Use logrotate_force to enable it and logrotate_period for the number of days:

    # plesk bin settings -s logrotate_force=true
    # plesk bin settings -s logrotate_period=8

    C:> plesk bin settings -s logrotate_force=true

    C:> plesk bin settings -s logrotate_period=8

Exit mobile version