• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

Jeff Mould

A Tech Blog by Jeff Mould

  • Home
  • Resources
    • Website Resources
    • How To Use WordPress
  • Jeff Mould
    • About Jeff Mould
    • Jeff Mould Links
    • Disclosure
  • Contact Jeff Mould
You are here: Home / Archives for crontab

crontab

Ubuntu Server Guide: Rotate Nginx log files

October 24, 2013 by Jeff Mould Leave a Comment

Once you have Nginx setup and configured for your server, a good idea is to next setup your server to automatically rotate and compress the Nginx log files on a daily basis. This will prevent the log files from growing to astronomical sizes over time and make them much easier to manage. There are a couple options for doing this, but the one I prefer the most is by using a cron job to regularly schedule these rotations. The following article assumes you have root access and can SSH into your server. Note:Improve your site performance and receive phenomenal support at the same time. For discounted hosting services visit Bluehost.com. The first thing you will need to do is create a the script for the job you are about to run via cron. This script is fairly straightforward in that it is going to tell the system to move the current access and error logs to a new file, create new ones, and the compress the old ones. Let's open our favorite editor (mine is nano) to create the … [Read more...] about Ubuntu Server Guide: Rotate Nginx log files

Filed Under: Nginx, Web Hosting Tagged With: cron, crontab, jeff mould, Linode, log files, Nginx, Ubuntu, ubuntu server guide

Primary Sidebar

Connect With Me

  • Facebook
  • GitHub
  • Google+
  • Instagram
  • LinkedIn
  • Pinterest
  • Tumblr
  • Twitter
  • YouTube

Top Posts & Pages

  • Responsive Multi level Drop Down Menu Bootstrap 3
  • Laravel 5.4 Redirect after Password Reset Email Sent
  • How-To Install Let's Encrypt SSL Certificate with Laravel
  • mySQL Foreign Key On Delete Cascade Not Working
  • Laravel 5 Error Handling

Copyright © 2016 - Jeff Mould - All Rights Reserved