Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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>
    DocumentRoot "C:\Program Files (x86)\AWStats\wwwroot"
    ErrorLog "logs/"
    CustomLog "logs/" 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 "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



Many many thanks for the help!

share|improve this question

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.

share|improve this answer
"You could also try using directives rather than directives," <-- what do you mean? – futureelite7 Jun 8 '10 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. – futureelite7 Jun 10 '10 at 2:33
@futureelite7 it is not parsing because you have AllowOverride set to none which will not allow your FilesMatch to ExecCGI – Prix Sep 5 '10 at 2:22

Your Answer


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.