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'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!

share|improve this question

1 Answer 1

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
1  
"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

 
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.