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 webmaster@example.com
    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!

futureelite7
  • 197
  • 1
  • 3
  • 8

1 Answers1

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.

Daniel Waechter
  • 266
  • 1
  • 5