mod perl in apache 2.2 not parsing perl scripts

Posted by futureelite7 on Server Fault See other posts from Server Fault or by futureelite7
Published on 2010-06-08T03:49:54Z Indexed on 2010/06/08 3:53 UTC
Read the original article Hit count: 562

Filed under:
|
|

Hi,

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!

© Server Fault or respective owner

Related posts about perl

Related posts about apache2.2