[SGVLUG] Apache + Perl configuration

Tom Emerson osnut at pacbell.net
Sat Jul 16 01:15:22 PDT 2005


> -----Original Message-----
> Dustin
> On Fri, 15 Jul 2005, Michael Proctor-Smith wrote:
> > [...]
> Sarge has both, I'm running apache 2.
> 

Awstats is also a "perl" program, though from the primary link you get a
"static" version of the page generated on-the-hour, going to my "blog" page
gives you this "live" link:

http://osnut.homelinux.net/awstats/awstats.pl?config=osnut.homelinux.net

In /etc/apache2/conf.d there is a file called "mod_perl.conf" which contains
some directives and other options:
=========================
<Directory "/srv/www/perl-lib">
    AllowOverride None
    Options None
    Order allow,deny
    Deny from all
</Directory>

<IfModule mod_perl.c>
    PerlRequire "/etc/apache2/mod_perl-startup.pl"

    ScriptAlias /perl/ "/srv/www/cgi-bin/"
    <Location /perl/>
        # mod_perl mode
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
        Options +ExecCGI
    </Location>

    ScriptAlias /cgi-perl/ "/srv/www/cgi-bin/"
    <Location /cgi-perl>
        # perl cgi mode
        SetHandler  perl-script
        PerlResponseHandler ModPerl::PerlRun
        PerlOptions +ParseHeaders
        Options +ExecCGI
    </Location>

    # The /cgi-bin/ ScriptAlias is already set up in httpd.conf

</IfModule>
=========================
As part of the awstats installation, it tacked the following onto
httpd.conf:

#
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"

#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/local/awstats/wwwroot">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
=================================

I hope this provides some "insight"



More information about the SGVLUG mailing list