Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
    
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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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