Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using plesk with a Media Temple DV 4.0 Account. It has a GUI to set up log rotation for my domains. However I need to append a date/time stamp to the logs so our stats software importer can identify them as different files. Because 1 becomes 2, and 2 becomes 3 ect... The importer thinks every file is new after each rotation.

I read that adding dateext to the logrotate file at /usr/local/psa/etc/logrotate.d/<domain.com> will append the date. But this file says DO NOT EDIT THIS IT IS AUTOMATICALLY GENERATED.

I would like to know where I can add the dateext to my log files!

I see the same question here but no one ever responded: http://forum.parallels.com/pda/index.php/t-112902.html

share|improve this question

1 Answer 1

Configuration files created by Plesk are generic.

You can create a new configuration file which does not get overwritten by psa – this is the recommended way of doing. Add a new file to your apache /conf.d directory. It's the best place to put your own server-wide configurations. Apache configurations are loaded in alphabetical order (e.g. zz011_my_custom_log.conf).

# Custom plesk log format
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{Host}i" plesklog

However, you can edit the default host templates (optionally) located in:


Just run the httpdmng utility. This will recreate all vhost configuration files based on the template. /usr/local/psa/admin/bin/httpdmng --reconfigure-all. Please note, that any manual changes could be overwritten by updates provided by Parallels.

share|improve this answer
Thank you @cept0 this is very good answer! I think my question may not have been as clear as I had thought though. Your answer looks like it will create a new pattern for each line written into the log files. What I need is to append the date to the log file its self. They look like this now access_ssl_log.processed.22.gz and I need them to look like access_ssl_log_20130508.processed.22.gz –  Jesse Burcsik May 8 '13 at 19:44
Take a look at Cronolog. Change the file format like %Y-%m-%d-access_ssl_log in your daily crontab file. You are welcome. –  askmatey May 9 '13 at 7:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.