From owner-freebsd-questions@freebsd.org Sat Jan 2 20:39:02 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBEF04DE272 for ; Sat, 2 Jan 2021 20:39:02 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7Ydd5PW6z3CVQ for ; Sat, 2 Jan 2021 20:39:01 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([178.12.36.81]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPA (Nemesis) id 1MZkYx-1kSsf70t6d-00WjDi; Sat, 02 Jan 2021 21:38:50 +0100 Date: Sat, 2 Jan 2021 21:38:48 +0100 From: Polytropon To: freebsd@dreamchaser.org Cc: FreeBSD Mailing List Subject: Re: rotate apache logs? Message-Id: <20210102213848.a90879bd.freebsd@edvax.de> In-Reply-To: <25261693-8d86-9c6f-eb87-c82da4fcc559@dreamchaser.org> References: <25261693-8d86-9c6f-eb87-c82da4fcc559@dreamchaser.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:6DRpdQPZhk8B+aGM9PoZtxe2l8+mncA2Lg2vThtIlYsTuXN8ZRz +T0VimQvTtm6nUrYhIdzPxyOcKht4YIL5KULoWVh1lVT79rfAHD6qlZ9OQZU3ZsP2Y83o8z Gv3U9wJq/IeYNGChRGY2HECaAtMgMjjWKsGDWAvtFLnVq0HpGIdD55jfnlFrO6J1pmtuVef T1AX2Q53gVXu+esUUpe5Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:/8lwNE39ANQ=:o2n/tYf9ZNlIUwsOhBjaKO REziA8PWUS3YZfCsBKCfjUcY/JAyXMBdcYKRWWv922zebi5nDgQ1pRr187bLkvx8wg9rowisG IhBCEh+CrKh8qGO+1ppqw+Gw8Kt+4Yu/p0x4wKpiaiBtNcMgjNNQ/cXoXNqGQ0IVXLo2glCG6 i52M6psuW5GJ6lWf3c7sSP/4tdakYgbO28956SdBoNEm3bHxoCXgqkX5sfHyFXnwbfP53xf9M 0Wyk4OZ3fmCu8vdEWImIrx+gat5xZ0gARmz8S4AWb33KMQaODm/nWtsMgv9qEwLjC8l372z0h qxuOVKvvuJSpqxEzI3x+wBwHLVNXQRVIfWsMYrNjX8mgLeSDuu901tszEeFdy5XFIrdIwq5lG GeC6R58fPorl/incRrwYLV6F8qOlBWZ6+m3Pv1NqdXxbPVu2da1XLOjevt4LR X-Rspamd-Queue-Id: 4D7Ydd5PW6z3CVQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.131) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [0.41 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.994]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.227.126.131:from]; RECEIVED_SPAMHAUS_PBL(0.00)[178.12.36.81:received]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[212.227.126.131:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.227.126.131:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.126.131:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 20:39:02 -0000 On Sat, 2 Jan 2021 13:12:56 -0700, Gary Aitken wrote: > It I look at /var/log, many of the logs are rotated. > However, apache logs are not, and I don't see a way in the apache config file > /usr/local/etc/apache24/httpd.conf to do this. > > Do each of the programs that rotate their logs have their own mechanism for > doing this, or is there a common mechanism that is used? I see that the > sysutils/logrotate port is available to do this, but not installed. It seems > strange that so many programs would rotate but not use a common utility for > that purpose. You can use the newsyslog facility provided by the FreeBSD OS. See /etc/newsyslog.conf and "man 5 newsyslog.conf" for details. It's possible to add configuration files for user-installed programs in /usr/local/etc/newsyslog.conf.d/ instead of adding the settings to the global configuration file. Also see "man 8 newsyslog" and /etc/crontab for further details. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...