Re: Apache UserDir でのCGI動作設定
( No.1 )
|
 |
- 日時: 2006/08/16 11:29
- 名前: 管理者
-
seichanさん、こんにちは。
> アクセスすると、500番、内部エラー この時に、apacheのエラーログ「/var/log/httpd/error_log」に何か情報が出力されていませんか?
また、コマンドで(root権限)以下を実行した時にエラーとならず何か出力されますか?
# perl 『ダウンロードしたCGI名』
|
Re: Apache UserDir でのCGI動作設定
( No.2 )
|
 |
- 日時: 2006/08/16 23:34
- 名前: seichan
-
<html>
<head> <META http-equiv="Content-Type" content="text/html; charset=EUC-JP"><title>促謄 孫促肇據村促存</title> </head> <body> CGI表村即促謄孫 虫</body> </html>
↑ここのサイトのWebサーバのCGI確認用のやつをtest.cgiで作成し、777とし、実行した結果です TTSSHからだと、今文字化けしてます(^^;
error_logには何も追記がないので、ブラウザに表示されるエラーを書き込みます。
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@yakudatu.info 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.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
以上です。
|
Re: Apache UserDir でのCGI動作設定
( No.3 )
|
 |
- 日時: 2006/08/17 14:43
- 名前: 管理者
-
もしかしたら、ファイル自体のコード体系に不備があるのかも知れません。
一度、ASCIIコードのみ(半角英数字のみ)で検証用CGIを作成してみてください。
|
Re: Apache UserDir でのCGI動作設定
( No.4 )
|
 |
- 日時: 2006/08/17 22:32
- 名前: seichan
-
返信ありがとうです。
[root@www cgi-bin]# perl /home/hukaya/www/cgi-bin/test.cgi Content-type: text/html <html> <head> <META http-equiv="Content-Type" content="text/html; charset=EUC-JP"><title>Title </title> </head> <body> CGI_TEST </body> </html>
サーバ上で作成しなおしたので、コード体系はサーバあわせになるかと思いますが、、、う〜ん、、、前回と同じエラーです。(ブラウザアクセス。
ううう〜ん、、、、謎だなぁ〜・・・と思う今日この頃・・・。
|
Re: Apache UserDir でのCGI動作設定
( No.5 )
|
 |
- 日時: 2006/08/17 22:32
- 名前: seichan
-
っと、追伸です。
今日はエラーログがはかれました・・・。
[Thu Aug 17 22:30:11 2006] [error] [client 192.168.1.30] Premature end of script headers: test.cgi [Thu Aug 17 22:30:36 2006] [notice] caught SIGTERM, shutting down [Thu Aug 17 22:30:40 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin /suexec) [Thu Aug 17 22:30:40 2006] [notice] Digest: generating secret for digest authent ication ... [Thu Aug 17 22:30:40 2006] [notice] Digest: done [Thu Aug 17 22:30:40 2006] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads. [Thu Aug 17 22:30:41 2006] [notice] Apache configured -- resuming normal operati ons
よろしくお願いします。
|
Re: Apache UserDir でのCGI動作設定
( No.6 )
|
 |
- 日時: 2006/08/17 22:56
- 名前: 管理者
-
cgiの冒頭文「#!/usr/local/bin/perl」を「#!/usr/local/bin/perl --」にしてみてください。
または、スクリプト自体をWindowsで作成して保存形式をEUCにして保存してください。 この後、FTP等で「バイナリモード」でサーバに転送して確認してみて下さい。
|
Re: Apache UserDir でのCGI動作設定
( No.7 )
|
 |
- 日時: 2006/08/19 20:03
- 名前: seichan
-
こんばんわです。
cgiの冒頭文「#!/usr/local/bin/perl」を「#!/usr/local/bin/perl --」にしてみてください。
または、スクリプト自体をWindowsで作成して保存形式をEUCにして保存してください。 この後、FTP等で「バイナリモード」でサーバに転送して確認してみて下さい。
を、やってみましたが、かわらないですね・・・・。 error_logには出力されませんでしたが、ブラウザにはいつものエラーが、、、う〜ん、、、。
|
Re: Apache UserDir でのCGI動作設定
( No.8 )
|
 |
- 日時: 2006/08/20 08:38
- 名前: 管理者
-
設定ファイルを以下の様に変更してみてください。
<IfModule mod_userdir.c> #UserDir disable UserDir /home/*/www </IfModule> ↓ <IfModule mod_userdir.c> #UserDir disable UserDir www </IfModule>
ちなみにドキュメントルート(UserDir でない本来の場所)でのCGIは確認取れていますよね?
|