Linux log rotation service
Disclaimer: the article is applicable to the Standard Linux Shared Hosting, not to Linux Shared Hosting NG. Refer to the article https://kb.odin.com/en/114326 for information about Linux Shared Hosting NG in OA.
The log rotation service is necessary to rotate Apache log files in customers' webspaces as well to rotate log files of system services managed by OA.
OA is using the stock Linux log rotation tool - logrotate.
OA just creates own logrotate configuration file
/etc/logrotate.d/pem where lists all log files to be rotated:
- Apache log files in all customers' webspaces hosted on a server
System log files like
/var/log/httpd_access_log.ssland so on
When logrotate is being run by cron task it reads all files in the
/etc/logrotate.d/folder (it is controlled by the
include /etc/logrotate.ddirective in the logrotate configuration file
/etc/logrotate.conf) and the
/etc/logrotate.d/pemfile in particular, and rotates all OA-managed log files.
OA does not use any log rotation resources in customer's subscriptions, this service is available to all customers who have subscription with Linux Shared Hosting services.
Provider may manage log rotation settings in OA Provider Control Panel in properties of a particular Linux Shared Hosting server:
- Go to server properties (hardware node or VPS)
- Switch to the Applications tab
- Click on the logrotate application
Switch to the Configuration tab
On the Default Settings tab Provider may set log rotation parameters for all customers' webspaces hosted on a server, the manageable parameters are as follows:
- Log rotation type - by time (daily/weekly/monthly) or by size
- Maximum number of rotated log files to keep (NOTE: If this value is set to 0, old versions are removed rather than rotated)
- Compress rotated log files or not
Send email notification after log rotation completed
On the Logfiles tab Provider may change all listed above parameters for every single customer's webspace.
See the main Knowledgebase article #115790 Website Hosting: General information, Best Practices and Troubleshooting for more information.