From owner-freebsd-questions@freebsd.org Tue May 10 04:49:22 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DBC7B35A29 for ; Tue, 10 May 2016 04:49:22 +0000 (UTC) (envelope-from cary@sdf.org) Received: from sdf.lonestar.org (mx.sdf.org [192.94.73.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ol.sdf.org", Issuer "ol.sdf.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5441AB6 for ; Tue, 10 May 2016 04:49:21 +0000 (UTC) (envelope-from cary@sdf.org) Received: from sdf.org (IDENT:cary@sdf.lonestar.org [192.94.73.15]) by sdf.lonestar.org (8.15.2/8.14.5) with ESMTPS id u4A4nENL005977 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO) for ; Tue, 10 May 2016 04:49:14 GMT Received: (from cary@localhost) by sdf.org (8.15.2/8.12.8/Submit) id u4A4nEWP020825 for freebsd-questions@freebsd.org; Tue, 10 May 2016 04:49:14 GMT Date: Tue, 10 May 2016 04:49:14 +0000 From: Cary To: "freebsd-questions@freebsd.org" Subject: Re: file receives no input after turn over by newsyslog(8) Message-ID: <20160510044913.GA963@SDF.ORG> Mail-Followup-To: "freebsd-questions@freebsd.org" References: <20160509222703.GA2794@SDF.ORG> <278899ea-8fc0-4898-2e38-0bca2009e45f@ssimicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <278899ea-8fc0-4898-2e38-0bca2009e45f@ssimicro.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2016 04:49:22 -0000 On Mon, May 09, 2016 at 06:20:00PM -0600, markham breitbach wrote: > The problem here is that httpd opens a file handle and keeps it open for > the log, so after it is rotated, the file handle follows the old file. > (you should still see entries showing up in the log.0). > > There are many articles written about this, but the idea is you need to > send apache a signal to release the file handle and start writing to the > new log. This is the first page that comes up in google: > > http://mikkel.hoegh.org/2009/10/08/rotating-apache-httpd-logfiles-freebsd/ > > -M > > On 2016-05-09 4:27 PM, Cary wrote: > > Hi all, > > > > Perhaps someone might be able to help. > > The /var/log/httpd-access.log file is turned over at least > > once a week on a VPS running 10.2-Stable. > > > > /var/log/httpd-*.log 644 10 500 * GX > > > > is the line I have in /etc/newsyslog.conf. > > After doing some more reading I found how the configuration in newsyslog.conf could be modified to send a signal 30 to the server process. /var/log/httpd-*.log 644 10 500 * GX /var/run/httpd.pid 30 Thank you for your replies Cody and Markham. Cary