fedoraにcgiでディレクトリとcgiを作成してテストするとInternal Server Errorが発生する

このQ&Aのポイント
  • fedoraでディレクトリを作成し、cgiスクリプトを作成してテストするとInternal Server Errorが発生します。
  • cgiスクリプトの設定が正しくない可能性があります。設定を見直し、再度テストしてみてください。
  • Internal Server Errorが発生した場合、サーバーの管理者に連絡し、エラーが発生した時間や行った操作を報告してください。
回答を見る
  • ベストアンサー

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 という風に表示されます。 設定が違っているのでしょうか?

質問者が選んだベストアンサー

  • ベストアンサー
  • onosuke
  • ベストアンサー率67% (310/456)
回答No.1

whoamiが実行できないのでは? フルパス指定するか,コメントアウトするか,試してみて下さい。

ModenaSpeed
質問者

補足

アドバイスありがとうございます。 >whoamiが実行できないのでは? 確かに出来ていません。 >フルパス指定するか,コメントアウトするか,試してみて下さい。 具体的にどこをどうすればいいでしょうか? 素人で申し訳ありません。

その他の回答 (1)

  • onosuke
  • ベストアンサー率67% (310/456)
回答No.2

冒頭の /usr/bin/perl のようにwhoamiのパスを指定してください。 (フルパス指定・絶対パス指定)

ModenaSpeed
質問者

補足

アドバイスありがとうございます。 今度は /usr/bin/whoami と表示されました。

関連するQ&A

  • 続・メールの送信

    Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster 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/2.0.39 Server at www.altoworld.com Port 80 こんな表示が出て、白紙でメールだけは届きます

    • ベストアンサー
    • CGI
  • Movable Type 3.34を使ってますが、急にブログが更新できなくなりました。

    Movable Type 3.34を使ってますが、急にブログが更新できなくなりました。 どなたか、お助けくださいませ。。 こんなエラーメッセージが出ます。 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, postmaster@ONES-CREATE.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の暴走で、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
  • mixiで動画をUPしたら・・・・

    mixiで動画をUPしたら・・・・ Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, mixi 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. と表示され、見ることができません。 どうしたらよいですか?

  • 教えて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. という表記が出てきます。 よく意味が分からないのですが、どのように対処すればよいのでしょうか よろしくお願いします

  • 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
  • これ、どういう意味??

    さっき、私のHPの掲示板のリンクをクリックしたら Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@teacup.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-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

  • ある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. どうしたらいいのでしょうか?