Working on a friends server earlier this morning I noticed that he had logrotate configured but he did not have a configuration file for Postfix. Below is the quick one I whipped up for his environment including a brief explanation of each line of the configuration file below the script. Following the explanation of the various configurations is the command to actually force logrotate to run in debug mode so you can see what happens.
Setting up log rotation for multiple Ruby on Rails projects on the same Linux server is easy using logrotate. If all of your projects are in the same directory structure it is even easier by using variables to work for each different project as explained below in detail.
First you will need to install logrotate which can be installed on CentOS Linux via yum as shown in the below command.
- yum install logrotate