• 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.

Question Limiting logs to 30 days

Maris

Basic Pleskian
Hello, how do i set a lifetime for all access logs? Like http, nginx etc. Let's say I would like to hold no more than 30 days of logs in my server and do not archive anything past that. So my server do not hold any log info for what happened before 30 days.
Thanks
 
If you talk about the logs of your hosted domains, for example like this: Plesk Panel > Service Plans > Logs & Statistics > Log rotation & Maximum number of log files

see also: Log Rotation
 
Last edited:
Does it include apache logs or just Plesk admin panel access logs? In my case - i need apache http access logs that register every single web-page request.
 
Well my example was for the domain logfiles under
Code:
/var/www/vhosts/system/*/logs
and as in the link above documented also for individual domains. If this is not what you talk about please specify which logfile you mean.
 
Last edited:
Yep the same one, though despite that i have set Log Rotation monthly, max no of log files = 3, compress log files, there's full of archived log files, god knows kept for how long.. what i want is to see only past 30 days logs, nothing more, no archives from previous year, no nothing, pure past 30 days and that's all
 
Well if you like to get this very old archives deleted you can do this on cmd line for example like:
Code:
# find old archive logs older than 180 days
find /var/www/vhosts/system/*/logs/*.gz -mtime +180

# find and delete them
find /var/www/vhosts/system/*/logs/*.gz -mtime +180  -exec rm {} \;
 
Last edited:
Back
Top