From owner-freebsd-questions@freebsd.org Tue May 10 00:47:10 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 08AFCB33326 for ; Tue, 10 May 2016 00:47:10 +0000 (UTC) (envelope-from markham@ssimicro.com) Received: from mail.ssimicro.com (mail.ssimicro.com [64.247.129.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.ssimicro.com", Issuer "RapidSSL SHA256 CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD83A1E2A for ; Tue, 10 May 2016 00:47:09 +0000 (UTC) (envelope-from markham@ssimicro.com) Received: from markham.ssimicro.com (markham.ssimicro.com [64.247.130.99]) (authenticated bits=0) by mail.ssimicro.com (8.14.7/8.14.7) with ESMTP id u4A0K0GF045607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Mon, 9 May 2016 18:20:01 -0600 (MDT) Subject: Re: file receives no input after turn over by newsyslog(8) To: "freebsd-questions@freebsd.org" References: <20160509222703.GA2794@SDF.ORG> From: markham breitbach Message-ID: <278899ea-8fc0-4898-2e38-0bca2009e45f@ssimicro.com> Date: Mon, 9 May 2016 18:20:00 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160509222703.GA2794@SDF.ORG> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 00:47:10 -0000 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 the file is turned over no messages are saved from the apache24 > daemon. There is just a line from newsyslog(8) with the date, hostname > process number and a message that the file was turned over. > > After restarting httpd(8) all messages are logged again. > Other httpd-* log files are do not fill up as quickly, but are > probably affected as well. How can I keep getting logs from > the server without a service restart? > >