The default setup of a (dv) server by Media Temple has logs set up to rotate weekly and without compression. This can result in huge log files that eat server resources and—as I've learned first-hand—kill your server.
Fortunately, this is really easy to work around. All it takes is:
- Root access to your server
- (Very) basic knowledge of the command line
In a terminal, connect to your server as root
(or as a user with sudo
privileges).
ssh [email protected]
Using vim
or the editor of your choice, edit /etc/logrotate.conf
:
vim /etc/logrotate.conf
Adjust the configuration settings as shown in the attached logrotate.conf
file.
Hat tip to Roger Stringer for pointing me in the right direction.