Apache 2.2.xx 설치 후 설정시 오류 ㅠ (.pl 실행안됨)

phw0317의 이미지

안녕하세요 지금 fedora 13 버전을 사용중에 있고 웹을 통해서 프로그램을 만들려고 하고 있습니다. 현재 펄 언어를 사용 하려고 하고 있습니다.

예전에 fedora 11사용 할 때에는 문제 없이 바로 바로 설정이 되었는데

버전 업그레이드를 하면서 잘 안되네요.

일단 httpd.conf 파일에서

<Directory "/web/httpd2/htdocs">
    AllowOverride None
    Options ExecCGI
    AddHandler cgi-script .pl .cgi
    Order allow,deny
    Allow from all
</Directory>

이부분을 수정해 주었습니다.

AddHandler에서 .pl을 없에면 화면에 소스만 출력이 되고

저대로 Addhandler 해주고 화면을 보면

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, phw0317@gmail.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

이런식으로 500 에러가 나게 됩니다

보려는 파일의 소스는

#!/usr/bin/perl
 
use CGI::Garp qw(fatalsToBrowser);
 
print "content-type: text/html \n\n";
 
print "
<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
 
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
</head>
";

입니다.

혹시 httpd.conf 파일에서 더 바꿔줘야 할 것이 있나요??

File attachments: 
첨부파일 크기
Binary Data httpd.conf_.tar.gz5.6 KB
incarnate의 이미지

#AddHandler cgi-script .cgi .pl

위 주석을 제거해 보시고 당연한 말이지만 apache가 daemon계정으로 돌아가는거 같은데

/web/httpd2/htdocs 디렉토리에 daemon 계정이 접근할 수 있어야 할겁니다.

주석 제거 후 apache restart 하시고요

먹고 죽자~

phw0317의 이미지

주석도 제거를 해봤었고 daemon이 아닌 제 개인 계정으로도 해봤습니다만 똑같이 인터넷 서버 에러가 뜨더군요..

2.2.17버전인데 도대체 무슨 문제일까요 ㅠㅠ

incarnate의 이미지



Options FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all

바꿔 보시고 다시한번 해보세요

아니면 docroot에 임시 test.html을 만드셔서 웹에서 나오는지 보시고 나오면 cgi 설정 문제일거 같고요

test.html도 나오지 않는다면 디렉토리 권한이나 selinux 문제일 겁니다.

먹고 죽자~

phw0317의 이미지

해결 됬습니다 감사합니다 (__*