• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Subdomain logs are not rotated

wilei

New Pleskian
Hi,

I'm running Plesk 12.5.30 (Update 40) on CentOS 7.2.1511, with latest updates installed for both Plesk and OS.

I found out that Plesk is missing correct log rotation rules for subdomain HTTP access logs (both logs from Apache and Nginx). I did some digging and there is no any configurations for subdomain log rotation in /usr/local/psa/etc/logrotate.d.

Let's say that domain I'm hosting with Plesk is domain.tld and subdomain under this domain is subdomain.domain.tld. Subdomain is used just to deliver huge amount of images, PHP etc. features are turned off for this subdomain, so it's only for static data. SSL for all connections.

Logs for domain.tld are found from path:
/var/www/vhosts/system/domain.tld/logs/

And for subdomain subdomain.domain.tld from path:
/var/www/vhosts/system/subdomain.domain.tld/logs/

There is log rotate configuration for domain.tld in file /usr/local/psa/etc/logrotate.d/domain.tld. But there is no rules for subdomain log rotation. There is this rotation group in configs: /var/www/vhosts/system/domain.tld/logs/*.processed but no group for subdomain logs.

This has led to situation where log /var/www/vhosts/system/subdomain.domain.tld/logs/access_ssl_log.processed has grown to pretty huge. 14 gigabytes and counting as there is no rotation for file.


How this can be fixed? And editing /usr/local/psa/etc/logrotate.d/domain.tld is out-of-scope as it's auto-generated by Plesk. Also all custom rotation configs are out-of-scope as these configs must be also auto-generated as domain log rotate configs are.
 
Yes, it is known issue. I have updated already existing report OMO-192 with your case.
 
Also, you can try to use the following workaround:

# plesk bin domain --update sub.domain.com -log-rotate true
 
Tried that provided workaround:

# plesk bin domain --update sub.domain.com -log-rotate true

And it created configuration for the log rotation. But the contents of the file is "wrong".

For the domain log rotation rules are:
/var/www/vhosts/system/domain.tld/logs/*.processed {
weekly
rotate 104
compress
missingok
}

but newly created rotation rules for subdomain.domain.tld are:
/var/www/vhosts/system/subdomain.domain.tld/logs/*.processed {
size=5242880
rotate 0
compress
missingok
}

Funny enough, I found out that logs for the another subdomain (under the same domain) but which is created way back earlier that the one with problems, has working log file rotation. For it log files are rotated once in a week. And rules for that domain are correct:

/var/www/vhosts/system/sub2.domain.tld/logs/*.processed {
weekly
compress
missingok
rotate 104
}
 
As far as I know this bug will be completely fixed in Plesk Onyx.
 
Back
Top