<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MrBrown blob &#187; newsyslog</title>
	<atom:link href="http://charles.lescampeurs.org/tag/newsyslog/feed" rel="self" type="application/rss+xml" />
	<link>http://charles.lescampeurs.org</link>
	<description>random bits.</description>
	<lastBuildDate>Sat, 10 Apr 2010 09:02:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Rotate Nginx log files under FreeBSD</title>
		<link>http://charles.lescampeurs.org/2008/07/17/rotate-nginx-log-files-under-freebsd</link>
		<comments>http://charles.lescampeurs.org/2008/07/17/rotate-nginx-log-files-under-freebsd#comments</comments>
		<pubDate>Thu, 17 Jul 2008 05:15:12 +0000</pubDate>
		<dc:creator>CharlyBr</dc:creator>
				<category><![CDATA[Logs]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[newsyslog]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://charles.lescampeurs.org/?p=27</guid>
		<description><![CDATA[To rotate your nginx log files, you can use the log file handler provided by FreeBSD: newsyslog. Configuring /etc/newsyslog.conf /var/log/nginx-access.log               644  7     1024 *     JC /var/run/nginx.pid /var/log/nginx-error.log                644  7     1024 *     JC /var/run/nginx.pid Before log rotation: -rw-r--r--  1 root  wheel    104278002 Jul 16 11:35 nginx-access.log -rw-r--r--  1 root  wheel      1509531 Jul 16 11:17 nginx-error.log After [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcharles.lescampeurs.org%2F2008%2F07%2F17%2Frotate-nginx-log-files-under-freebsd"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcharles.lescampeurs.org%2F2008%2F07%2F17%2Frotate-nginx-log-files-under-freebsd&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>To rotate your nginx log files, you can use the log file handler provided by FreeBSD: newsyslog.</p>
<h2>Configuring /etc/newsyslog.conf</h2>
<pre>/var/log/nginx-access.log               644  7     1024 *     JC /var/run/nginx.pid
/var/log/nginx-error.log                644  7     1024 *     JC /var/run/nginx.pid</pre>
<p>Before log rotation:</p>
<pre>-rw-r--r--  1 root  wheel    104278002 Jul 16 11:35 nginx-access.log
-rw-r--r--  1 root  wheel      1509531 Jul 16 11:17 nginx-error.log</pre>
<p>After log rotation:</p>
<pre>-rw-r--r--  1 root  wheel        967 Jul 16 12:42 nginx-access.log
-rw-r--r--  1 root  wheel    5310443 Jul 16 12:41 nginx-access.log.0.bz2
-rw-r--r--  1 root  wheel         77 Jul 16 12:41 nginx-error.log
-rw-r--r--  1 root  wheel      37552 Jul 16 12:41 nginx-error.log.0.bz2</pre>
<h2>Links</h2>
<ul>
<li><a title="FreeBSD newsyslog man page" href="http://www.freebsd.org/cgi/man.cgi?query=newsyslog&amp;sektion=8&amp;apropos=0&amp;manpath=FreeBSD+7.0-RELEASE" target="_blank">newsyslog man page</a></li>
<li><a title="FreeBSD newsyslog.conf man page" href="http://www.freebsd.org/cgi/man.cgi?query=newsyslog.conf&amp;sektion=5&amp;apropos=0&amp;manpath=FreeBSD+7.0-RELEASE" target="_blank">newsyslog.conf man page</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://charles.lescampeurs.org/2008/07/17/rotate-nginx-log-files-under-freebsd/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
