Apache 2.2의 Mod Perl이 Perl 스크립트를 구문 분석하지 않습니다.

Apache 2.2의 Mod Perl이 Perl 스크립트를 구문 분석하지 않습니다.

저는 mod_perl(mod perl v2.0.4 / perl v5.10.1)을 사용하여 Windows Server 2008 R2에 새로운 Apache 2.2.15 서버를 설정했습니다. Mod_perl 및 Perl 5.10이 문제 없이 설치 및 로드되었습니다. 그러나 내 구성에도 불구하고 mod_perl 모듈은 내 .pl 파일을 인식하고 실행하지 못하고 대신 Perl 소스를 인쇄하도록 선택했습니다. 내가 무엇을 잘못했고, 클라이언트에 보내는 대신 Perl이 내 pl 스크립트를 처리하도록 하려면 어떻게 해야 합니까?

내 구성:

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

많은 도움을 주셔서 감사합니다!

답변1

아마 당신이 본 것 같아요이 페이지? mod_perl을 올바르게 로드하고 있습니까?

더 이상 중요한지는 잘 모르겠지만 적어도 Apache에서 경로에 슬래시를 사용해야 했으므로 예를 "C:\Program Files (x86)\AWStats\wwwroot\cgi-bin"들어 "C:/Program Files (x86)/AWStats/wwwroot/cgi-bin". 또한 귀하의 </directory>대문자가 대문자가 아닌 것으로 나타났습니다. 그게 중요한지 확실하지 않습니다.

지시문 대신 지시문을 사용해 볼 수도 있습니다. 그러면 지시문이 각각 "" 및 ""로 변경됩니다.

관련 정보