Configuration issue adding AWStat to Apache v2.2

9,025

Solution 1

Have you got Perl installed? AFAIK ActivePerl is the one everyone uses.

Solution 2

I had to do the following additional things to get this working:

1) Activate CGI by adding to my Apache httpd.conf file the following options:

Options ExecCGI
AddHandler cgi-script .cgi .pl

2) Edit my Perl scripts to replace the default location of #!/usr/bin/perl with the one for my windows perl install: #!c:/Perl/bin/perl.exe

Then it worked!

Share:
9,025

Related videos on Youtube

reitermarkus
Author by

reitermarkus

Updated on September 17, 2022

Comments

  • reitermarkus
    reitermarkus over 1 year

    I'm trying to add AWStats to my working Apache website. But when I go to my perl script it fails:

    http://localhost/awstats/awstats.pl?config=my.domain.here
    

    I get this error 500 in the browser:

    Internal Server Error
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    

    I have the following error log entries

    [Mon Feb 01 19:59:48 2010] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified.  : couldn't create child process: 720002: awstats.pl
    [Mon Feb 01 19:59:48 2010] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified.  : couldn't spawn child process: C:/Program Files/AWStats/wwwroot/cgi-bin/awstats.pl
    

    I thought it was maybe due to cgi not being enabled, so I added this to my config file:

    ScriptAlias /cgi-bin/ "C:/Program Files/AWStats/wwwroot/cgi-bin/"
    
    <Directory "C:/Program Files/AWStats/wwwroot/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
    

    But that didn't seem to help. Note that AWStats inserted the following at the end of the config file:

    Alias /awstatsclasses "C:/Program Files/AWStats/wwwroot/classes/"
    Alias /awstatscss "C:/Program Files/AWStats/wwwroot/css/"
    Alias /awstatsicons "C:/Program Files/AWStats/wwwroot/icon/"
    ScriptAlias /awstats/ "C:/Program Files/AWStats/wwwroot/cgi-bin/"
    

    Note that localhost seems to go to my first virtual entry:

    <VirtualHost *:80>
    DocumentRoot "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\myDomain"
    ServerName my.domain.here
    Redirect /index.html http://my.domain.here/myDirectory
    

    Please suggest what might be going wrong.

    Thanks.

  • reitermarkus
    reitermarkus about 14 years
    Yes, AWState refuses to install unless Perl is first installed.