• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • 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.

Possible to setup a custom log file to be rotated

Z

zenstruck

Guest
I like how the apache logs for each site are available through the interface and are rotated to my settings. Is it possible to add a custom log file to this list?

Thanks,
Kevin
 
Sure,

create a new file in /etc/logrotate.d/ named like your log you would like to rotate.

Place the following inside the file (taken from apache logrotate):
Code:
/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    postrotate
        /sbin/service httpd reload > /dev/null 2>/dev/null || true
    endscript
}

Here you can set different options (in short):
Set the right path to your log !
missingok = no error if there is no log file
notifempty = rotate only if log conatins data
sharedscripts = donno :D
postrotate = maybe it's a good idea to reload or restart the service, so a new file will be created
 
customize log rotate per domain

After installing nginx I have 2 more log files inside ~/statistics/logs for every domain — nginx access and error logs for this domain.

PSA generates it's per domain log rotate settings in /usr/local/psa/etc/logrotate.d
I need to add those naginx logs to every domain.tld file in that directory

grep -r 'logrotate.d' inside /usr/local/psa didn't help
 
Back
Top