<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>Fun with ones and zeros - awstats</title>
<description><![CDATA[Barry's notes on computer software and hardware]]></description>
<link>/blog/tags/awstats</link>
<lastBuildDate>Sat, 13 Jun 2026 09:04:09 -0700</lastBuildDate>
<item>
<title>AWStats under Nginx and SCGI</title>
<link>/blog/entries/awstats-under-nginx-and-scgi</link>
<pubDate>Wed, 14 Sep 2011 06:00:00 -0700</pubDate>
<author>bp@barryp.org (Barry Pederson)</author>
<description><![CDATA[<body><p>Earlier, I wrote about running <a href="/blog/entries/cgi-scripts-nginx-using-scgi">CGI Scripts with Nginx using SCGI</a>
with the help of a small C shim.  One particular CGI app I've had to
alter slightly to work under this setup is <a href="https://awstats.sourceforge.io/">AWStats</a>, which
is a decent-sized Perl app, but only requires one line added to satisfy
SCGI's requirement of a <code>Status</code> line at the beginning of a response.</p>
<p>Here's a patch to AWStats 7.0</p>
<div class="source"><pre><span></span><span class="gd">--- awstats.pl.original 2011-09-11 21:20:40.954555528 -0500</span>
<span class="gi">+++ awstats.pl  2011-03-31 00:19:35.867343845 -0500</span>
<span class="gu">@@ -750,6 +750,7 @@</span>
 #------------------------------------------------------------------------------
 sub http_head {
        if ( !$HeaderHTTPSent ) {
<span class="gi">+                print "Status: 200 OK\n";</span>
                my $newpagecode = $PageCode ? $PageCode : "utf-8";
                if ( $BuildReportFormat eq 'xhtml' || $BuildReportFormat eq 'xml' ) {
                        print( $ENV{'HTTP_USER_AGENT'} =~ /MSIE|Googlebot/i
</pre></div></body>]]></description>
</item>
</channel>
</rss>