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


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] (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] (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

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.



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

  • Yes, AWState refuses to install unless Perl is first installed.
    – WilliamKF
    Feb 2 '10 at 5:10

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.