• 締切済み

リナックスのサーバーでCGIを動かそうとしたらば

上記質問タイトルのような事をした所下記のようなエラーメッセージが出てきました。 ファイルの入れた場所はcgi-binの中に入れました。 最初のファイル名はindex.cgiです。 パーミッションも755に変更しました。 どのようなエラーなのか教えて頂けるかたどうか教えて下さい。 ///エラーメッセージ////////////// Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, mail@it-service.co.jp 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. -------------------------------------------------------------------------------- Apache/1.3.17 Server at 192.168.0.29 Port 80

  • aeic
  • お礼率10% (60/582)

みんなの回答

  • kaka-to
  • ベストアンサー率0% (0/3)
回答No.4

ブラウザに表示される「Internal Server Error」は何も原因を表していません。 せいぜい「このファイルがCGIなのはわかるけどなんか間違ってて実行できないよ」という情報だけです。 このエラーがが返される場合  ・構文エラー(重大なミスから一文字書き忘れのケアレスミスまで)  ・パーミッションの間違い   該当ファイルだけでなく、関連したファイル、ディレクトリ全てチェックしたほうが良いです。   たとえば、index.cgiを実行するとlogディレクトリのlog.datに書き込みをする   という場合、index.cgiは755、log/とlog.datは777となりますが(一般論です)   log/がうっかり755だったという場合でもこのエラーが帰ってきます。 この2点が主な原因だと思います。 inoue64さんのアドバイスで解決できそうに思いますけれどいかがでしょう? 結構、次の日にチェックしてみたらマヌケなミスで 何故昨日の自分は気づかなかったのか...とかあるんですけどね。。。 どうしても解決できない場合、私はスクリプトの適当なところに  print "Content-type: text/html\n\nOK.\n"; exit(1); というのを記述して虱潰しにミスを捜します...オススメできませんが。

  • liq
  • ベストアンサー率38% (228/595)
回答No.3

全く自信ないのですが... もし、index.cgiを呼び出すのに相対パスを使用されていたら、絶対パスをためしてみてください。http://...のように。 他のCGIファイルが動いているサーバーならよいのですが、自ら設定して初めてCGIを使おうとされているのなら、confファイルの記述が適切でない可能性もあるかも。

  • inoue64
  • ベストアンサー率29% (334/1115)
回答No.2

追加 単なる文法エラーかもしれないので、 No.1の回答(自分の回答)の参考URLを参考にしてください。

  • inoue64
  • ベストアンサー率29% (334/1115)
回答No.1

・Perlの場合、Perlのパスがあっていない場合 先頭の行の、 #!/usr/bin/perl のようなものを、書きかえてください。 ・他のファイルのパーミッションの誤り  http://tohoho.wakusei.ne.jp/wwwxx012.htm  などを参照して、設定してください。

参考URL:
http://www.att.or.jp/perl/cgi-debug-env/deb-tech.html

関連するQ&A

  • Internal Server Error???

    こんにちは。 CGIを作ったのですが、 【Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@life-web.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. 】 と言うエラーが出て動きません. もう一つ同じようなcgiを作ったのですが、そちらは普通に動きます.すみませんが、このエラーの場合はどうしたらいいですか? CGIはメールフォームからのメールを送信するものです。

    • ベストアンサー
    • CGI
  • 教えてgooサーバーエラー

    すみません 教えてgooでInternal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@ask01.goo.ne.jp 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 Internal Server Error

    http://iboard3.to/ で始まるURLのどのサイトでも 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, info@iboard2.to 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. と表示され、見ることができません。 どうしたらよいですか?

  • fedoraにcgi

    mkdir でディレクトリを作って vi who cgiを作って 内容は #!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html><body>\n"; print "<pre>"; print 'whoami'; print "</pre>"; print "</body></html>"; なのですが、 ブラウザでテストすると Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, ****@hotmail.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. Apache/1.3.29 Server at test.modena.com Port 81 Please contact the server administrator, ****@hotmail.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. Apache/1.3.29 Server at test.modena.com Port 81 という風に表示されます。 設定が違っているのでしょうか?

  • CGIの暴走で、500エラーになり修復できません。

    現在、借りているサーバーで大量にメールマガジンを配信したところ急に、他のショッピングカートなどの CGIが以下の様なエラーになりました。 どうすれば修復できるのでしょうか? > Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@ドメイン名 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. -------------------------------------------------------------------------------- Apache/1.3.33 Server at ドメイン名 Port 80

    • ベストアンサー
    • CGI
  • 内部サーバーエラーについて

    HPを作っていたとき内部サーバーエラーと出ました。 サーバーはhttp://www.pf-x.net/ エラーメッセージは、 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, w@pf-x.net 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. やったことは、エラーページを製作して、 .htaccessを入れたらだめになりました。 どういう意味か、また、対処法を教えてください。

  • require文が実行できない

    perl で require 'cgi-lib.pl'; または require "jcode.pl"; を実行すると、 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@mshome.net 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. というメッセージが出ます。(cgi-lib.pl、jcode.plは同じディレクトリにあります。)

  • 内部サーバーエラーについて

    検索エンジンロボットシミュレーター http://www.searchengineoptimization.jp/tools/search_engine_robot_simulator.html を使ってアドレスを入力して解析ボタンをクリックすると 以下の様なメッセージが出ます。 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webadmin@searchengineoptimization.jp 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. どのようにすれば、エラーが出ずに正確に解析できるのでしょうか? 以上宜しくお願いします。 --------------------------------------------------------------------------------

  • あるHPにアクセスしてのエラー

    以下のエラーが出ました。これは、私の方のせいですかね?いきなり英語でエラーメッセージが出ても・・・ Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, あるHPのアドレス 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. どうしたらいいのでしょうか?

  • 新しいCGIをアップするたびに…

    新しいCGIをアップするたびに『Internal Server Error』となるんです。 今回も、下記のエラーで困っています。皆さん、アドバイスをお願い致します。 The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, ××@○○○.△△.ne.jp 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. プログラムの内容は、カレンダーです。 ファイルは、アスキーモードでアップし、パーミッションは755で行ないました。 また、サーバーがlinuxの為、改行コードを『LF』に変更して、アップし直してみましたが同じでした。 また、パスもサーバー指定の『#!usr/bin/perl』になっています。 パーミッションも755、705の両方で試してみました。 しかしだめだったのです。 よろしくお願い致します。

    • ベストアンサー
    • CGI