- PR -

Apache2.0のCGI動作とperl.conf

1
投稿者投稿内容
そもさん
会議室デビュー日: 2003/09/24
投稿数: 6
投稿日時: 2004-09-03 18:55
REDHAT9+Apache2.0+Perl5.8にてWEBサーバーを構築中です。
複数のドメインでの運用予定ですので、バーチャルホストで動作させております。
CGIはちゃんと動作してくれるのですが、cgi-binのディレクトリにおいたhtmlドキュメントを
開こうとすると、
Unrecognized character \\x82 at /home/xxxx/public_html/cgi-bin/sample.html line 2.
のエラーが発生します。
おそらく、スクリプトとみなしていると思い、httpd.confやperl.confを見直しておりますが、
いまひとつはっきりしません。

****** httpd.confの関連すると思われる部分 ********
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews SymLinksIfOwnerMatch ExecCGI IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>


<VirtualHost 111.111.111.111>
ServerAdmin xxx@xxx.com
DocumentRoot /home/xxx/public_html
ServerName www.xxx.com
ErrorLog logs/guinness.cc-error_log
CustomLog logs/xxx-access_log combined
Alias /cgi-bin/ /home/xxx/public_html/cgi-bin/
Alias /icon/ /var/www/icons/
</VirtualHost>

#AddHandler cgi-script .cgi .plはコメントのままでも、
設定しても動作かわりませんでした

******* perl.confの内容 *******
LoadModule perl_module modules/mod_perl.so

<Directory "/home/*/public_html/cgi-bin">
SetHandler perl-script
PerlHandler ModPerl::Registry::handler
PerlOptions +ParseHeaders
Options +ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>

何か解決方法をアドバイスいただければ幸いです。

よろしくお願いいたします
kalze
ぬし
会議室デビュー日: 2003/10/23
投稿数: 406
お住まい・勤務地: 東京・東京
投稿日時: 2004-09-03 21:49
引用:

そもさんさんの書き込み (2004-09-03 18:55) より:
CGIはちゃんと動作してくれるのですが、cgi-binのディレクトリにおいたhtmlドキュメントを
開こうとすると、
Unrecognized character \x82 at /home/xxxx/public_html/cgi-bin/sample.html line 2.
のエラーが発生します。
おそらく、スクリプトとみなしていると思い、httpd.confやperl.confを見直しておりますが、
いまひとつはっきりしません。

<Directory "/home/*/public_html/cgi-bin">
SetHandler perl-script
PerlHandler ModPerl::Registry::handler
PerlOptions +ParseHeaders
Options +ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>



SetHandler perl-script
とこのディレクトリにあるファイルをperl-scriptとして処理するように設定してありますが?
_________________
1

スキルアップ/キャリアアップ(JOB@IT)