Apache2 + Perl CGI 환경 구성중… 에러가 무지하게 떠요 ㅠ.ㅠ
perl도 설치 잘되서 터미널상에서 잘 돌아가고
phpmyadmin 까지 잘 설치가 되고(php)
perl dbd dbi는 잘 되구요…
근데 apache2-mod-perl2를 설치하고 하면
cgi파일이 웹에서 인식이 되서 돌아가면
이렇게 나와버리네요 ㅠ.ㅠ 몇시간째 이것땜에 삽질 중입니다. ㅠ.ㅠ.
혹시 perl CGI 돌려보신 분들 조언 부탁드립니다. ㅠ.ㅠ
500 Internal Server Error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost 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.
user1
(강분도)
11월 7, 2010, 2:47오후
2
우선 CGI 사용을 위한 패키지 이름은 libapache2-mod-perl2 입니다.
그리고 아래 내용처럼 특정 디렉에 CGI 가 가능하도록 아파치 설정을 해주어야 합니다.
[code:3elwt4sv] #예 ) /var/www/cgi-bin/ 디렉토리가 CGI 가능하게 하기
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory /var/www/cgi-bin/>
Options ExecCGI
AddHandler cgi-script cgi pl
</Directory>[/code:3elwt4sv]
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory /var/www/cgi-bin/>
Options ExecCGI
AddHandler cgi-script cgi pl
</Directory>
이 구문을
제 기계에선 /var/www/cgi 라는 곳에서 돌아가겠금 한다 하여
ScriptAlias /cgi-bin/ /var/www/cgi/
<Directory /var/www/cgi/>
Options ExecCGI
AddHandler cgi-script cgi pl
</Directory>
라고 넣어 주었습니다…
퍼미션도 chmod 755 -R /var/www
chmod 755 -R /var/www/cgi
이렇게 다 주었습니다.
허나 결과는 똑같이 나도더군요 prompt로만 perl 프로그래밍하다가 cgi한번 그냥 끄적거리기가 힘드네요 ^^
우여곡절끝에 Hello World를 띄웠습니다. 순간 감격의 눈물이 ^^
*.cgi 파일은 돌아갑니다…
하지만 *.pl이라고 된 파일은 전혀 작동이 되지 않습니다.
셋팅은 위에 같이하였습니다.