1

I've set up a fresh Apache 2.2.15 server on windows server 2008 R2 with mod_perl (mod perl v2.0.4 / perl v5.10.1). Mod_perl and Perl 5.10 has been installed and loaded without problems. However, despite my configuration, the mod_perl module is failing to recognize and execute my .pl file, instead opting to print out the perl source instead. What did I do wrong, and how do I make perl process my pl script instead of sending it to the client?

My configuration:

<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:\Program Files (x86)\AWStats\wwwroot" ServerName analysis.example.com ServerAlias analysis.example.com ErrorLog "logs/analysis.example.com-error.log" CustomLog "logs/analysis.example.com-access.log" common DirectoryIndex index.php index.htm index.html PerlSwitches -T <Directory "C:\Program Files (x86)\AWStats\wwwroot"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Directory "C:\Program Files (x86)\AWStats\wwwroot\cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all <FilesMatch "\.pl$"> SetHandler perl-script # #PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI </FilesMatch> </directory> </VirtualHost> 

Many many thanks for the help!

1 Answer 1

0

I assume you've looked at this page? Are you certain you're loading mod_perl correctly?

I'm not sure if it matters any more, but you at least used to need to use forward-slashes for paths in Apache, so for example change "C:\Program Files (x86)\AWStats\wwwroot\cgi-bin" to "C:/Program Files (x86)/AWStats/wwwroot/cgi-bin". I also noticed that your </directory> is uncapitalized, not sure if that matters either.

You could also try using directives rather than directives, so they'll change to "" and "", respectively.

3
  • 1
    "You could also try using directives rather than directives," <-- what do you mean? Commented Jun 8, 2010 at 6:58
  • The mod_perl module was loaded, I could see it on the control panel. Not sure why it's not parsing though. Commented Jun 10, 2010 at 2:33
  • @futureelite7 it is not parsing because you have AllowOverride set to none which will not allow your FilesMatch to ExecCGI Commented Sep 5, 2010 at 2:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.