apache 에서 cgi-bin 의 설정 문제 입니다.

qprk의 이미지

기존에 있던 홈의 서버를 이전하였습니다.

http://www.qprk.pe.kr/cgi-bin/WebBoard.cgi?db=photoGallery

위의 url 에서 어떤 글을 읽기 위해서 클릭하면 아래와 같이 나오면서 에러가 납니다.

http://www.qprk.pe.kr/home/qprk/cgi-bin/WebBoard.cgi?db=photoGallery&mode=read&num=54&page=1&ftype=6&fval=&backdepth=1

분명 같은 바이너리를 사용하고 있는데 위와 아래의 차이가 납니다.
아래는 이전하기전의 url 입니다.

http://guseok.qprk.pe.kr/cgi-bin/WebBoard.cgi?db=photoGallery

에서 아무글이나 클릭하면 아래와 같이 잘 나옵니다.
http://guseok.qprk.pe.kr/cgi-bin/WebBoard.cgi?db=photoGallery&mode=read&num=54&page=1&ftype=6&fval=&backdepth=1

위 두 경우에서 차이가 나는것은 게시물을 클릭하였을경우 url에서 /home/qprk가 들어가면서 에러가 납니다.

httpd.conf 에서 특별한 설정은 하지 않았고 virtual host 만 설정한 상태 입니다.

그리고 사용하는 서버는

guseok -> wow paran R2
www -> redhat9

에 기본으로 설치되는 web server 를 사용하였습니다.

아래는 설정한 virtual host 의 코드 입니다.

<VirtualHost 123.456.789.012>
    ServerAdmin abc@def.com
    ServerAlias www.qprk.pe.kr
    DocumentRoot /home/qprk/public_html
    ScriptAlias /cgi-bin/ "/home/qprk/cgi-bin/"
    ServerName qprk.pe.kr
    ErrorLog /home/qprk/web_log/error_log
    CustomLog /home/qprk/web_log/access_log combined
</VirtualHost>

<VirtualHost 098.765.432.123>
    ServerAdmin abc@def.com
    ServerAlias guseok.qprk.pe.kr
    DocumentRoot /home/qprk/public_html
    ScriptAlias /cgi-bin/ "/home/qprk/cgi-bin/"
    ServerName qprk.pe.kr
    ErrorLog /home/qprk/web_log/error_log
    CustomLog /home/qprk/web_log/access_log combined
</VirtualHost>
codebank의 이미지

정답은 아니겠지만 일단 ScriptAlias에서 문제가 발생한 듯하니 그부분을 수정해 보세요.
즉,
<VirtualHost 098...
...
ScriptAlias /cgi-bin/ "/home/qprk/cgi-bin/" <-- 이부분을
ScriptAlias /cgi-bin/ "/cgi-bin/" <-- 이렇게

변화시켜보고 테스트를 해보세요.

------------------------------
좋은 하루 되세요.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.