|
|
|
|
 cgi难题 - tomduanj [ 2004-06-03 21:10 | 4,660 byte(s)]
 ScriptAlias /cgi-bin/ /var/www/6490/cgi-bin/上是否要双引 - isgod [ 2004-08-04 10:45 | 0 byte(s)]
 Re: cgi难题 - Osment [ 2004-07-27 16:24 | 18 byte(s)]
 Re: cgi难题 - redcandle [ 2004-06-03 23:23 | 239 byte(s)]
 Re: cgi难题 - tomduanj [ 2004-06-04 10:43 | 25 byte(s)]
 Re: cgi难题 - redcandle [ 2004-06-04 12:29 | 114 byte(s)]
 Re: cgi难题 - tomduanj [ 2004-06-04 22:51 | 107 byte(s)]
 Re: cgi难题 - redcandle [ 2004-06-05 10:11 | 34 byte(s)]
 Re: cgi难题 - tomduanj [ 2004-06-05 23:10 | 48 byte(s)]
 Re: cgi难题 - redcandle [ 2004-06-06 22:48 | 113 byte(s)]
|
|
|
|
[Original]
[Print]
[Top]
|
这个问题已经困扰了我3天了,是这样的,一台REDHAT 服务器上已经运行LB5000论坛1年多时间了,一直运行比较稳定,现在我想在上面做个虚拟主机,再装个同样的论坛,下面是我的httpd.conf配置:
User apache
Group apache
DocumentRoot "/var/www/html"
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/6490/html">
options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/6490/cgi-bin/">
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
NameVirtualHost 202.96.104.18
<VirtualHost 202.96.104.18>
ServerAdmin duanjiang@zrcc.com
DocumentRoot /var/www/6490/html
ScriptAlias /cgi-bin/ /var/www/6490/cgi-bin/
AddHandler cgi-script .cgi .pl
ServerName mail.hisys.com.cn
ErrorLog logs/6490.hisys.com.cn-errorLog
CustomLog logs/6490.hisys.com.cn-access_log common
</VirtualHost>
<VirtualHost 202.96.104.18>
ServerAdmin tomduanj@hisys.com.cn
DocumentRoot /var/www/html
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
ServerName bbs.hisys.com.cn
ErrorLog logs/bbs.hisys.com.cn-errorLog
CustomLog logs/bbs.hisys.com.cn-access_log common
</VirtualHost>
但运行install.cgi总报错
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, ddg@test.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/2.0.46 (Red Hat) Server at mail.hisys.com.cn Port 80
access_log
202.96.104.18 - - [03/Jun/2004:20:08:22 +0800] "GET /cgi-bin/install.cgi HTTP/1.1" 500 624
error_log
[Thu Jun 03 20:08:22 2004] [error] [client 202.96.104.118] Premature end of script headers: install.cgi
[Thu Jun 03 20:08:22 2004] [error] [client 202.96.104.118] Can't modify constant item in substitution (s///) at /var/www/6490/cgi-bin/install.cgi line 171, near "s/[af
e
`~!@#$\%^&*()+=\{};':",./<>?[]]//isg;"
[Thu Jun 03 20:08:22 2004] [error] [client 202.96.104.118] Execution of /var/www/6490/cgi-bin/install.cgi aborted due to compilation errors.
有人说是cgi程序上传时要用AscII形式,我也尝试过,不行,结果也是如上面错误一样;
有人说是权限、属性不对,我使用了以下命令,仍旧不行
chown -R apacha.apache /var/www/6490
chmod -R 777 /var/www/6490
在console上直接运行/var/www/6490/cgi-bin/install.cgi,出现错误:
[root@hisys 6490]# /var/www/6490/cgi-bin/leoboard.cgi
: bad interpreter: No such file or directoryusr/bin/perl
但运行正在跑的这个论坛,却是好的
/var/www/cgi-bin/leoboard.cgi
[root@hisys 6490]# /var/www/cgi-bin/leoboard.cgi|more
Set-Cookie: onlineview=1; path=/; expires=Sat, 03-Jul-2004 12:31:05 GMT
Set-Cookie: union=1; path=/; expires=Sat, 03-Jul-2004 12:31:05 GMT
Set-Cookie: catlog=; path=/; expires=Sat, 03-Jul-2004 12:31:05 GMT
Expires: Wed, 02 Jun 2004 12:31:05 GMT
Date: Thu, 03 Jun 2004 12:31:05 GMT
Content-Type: text/html; charset=gb2312
<html>
到第什么地方错了?
|
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
不太会弄apache
不过你的错误信息里有下面这一句:
: bad interpreter: No such file or directoryusr/bin/perl
请检查你的install.cgi
确认首行是
#! /usr/bin/perl
|
|
|
[Original]
[Print]
[Top]
|
|
|