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의 이미지

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

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.