我的Apache打开不了CGI文件

由 poonremote 在 05-21-2002 13:05 发表:

我的Apache打开不了CGI文件

Internal Server Error

The server encountered an internal error or misconfiguration and was

unable to complete your request.

我想在我的Red Hat Linux上安装雷傲论坛,却无法打开install.cgi, 浏览器总是说:

Please contact the server administrator, root@localhost 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.

错误日志是:

error_log

[Tue May 21 11:34:40 2002] [error] (2)No such file or directory: exec of

/var/www/cgi-bin/install.cgi failed

[Tue May 21 11:34:40 2002] [error] [client 127.0.0.1] Premature end of

script headers: /var/www/cgi-bin/install.cgi

请高手指点,谢谢!!


由 pandonny 在 05-21-2002 13:41 发表:


可能你第一行的 Perl 解释路径不对。

还有可能是你的服务器没有安装 CGI.pm 库。


关爱社区,共建家园!


由 poonremote 在 05-22-2002 14:19 发表:


我如何知道我是否安了CGI.pm?,我又该如何安装?


由 pandonny 在 05-22-2002 17:14 发表:


兄弟,别急。。。

具体的是哪个安装包我也忘了,你把安装盘里所有的perl*.rpm都装上吧


关爱社区,共建家园!


由 Envymask 在 05-24-2002 13:53 发表:


我的也是这样,老是出现500错误。

路径也都是对的,可能就是那个cgi.pm没有装吧。


由 poonremote 在 05-27-2002 20:34 发表:


怎办啊!!!!


由 pandonny 在 05-27-2002 21:28 发表:


兄弟,别急,我明天就到单位去实验一下,然后把结果贴出来。。。。


关爱社区,共建家园!


由 poonremote 在 05-29-2002 10:11 发表:


thank you!!


由 pandonny 在 05-29-2002 11:24 发表:


兄弟,把python*.rpm和perl*.rpm都装上去试试

可能apache还有重新编译一下


关爱社区,共建家园!


由 poonremote 在 05-29-2002 16:25 发表:


还是不行


由 littlemayi 在 05-30-2002 23:06 发表:


你检查一下你的httpd.conf文件,里面有关于cgi配置的选项,看你的错误提示,好像是cgi的解释有问题,有关路径,看看配置那块。


由 poonremote 在 06-02-2002 14:13 发表:


我看他的默认配置是允许cgi的哦


由 IBICFY 在 10-18-2002 06:01 发表:


我也得到这个错误:

[Tue May 21 11:34:40 2002] [error] [client 127.0.0.1] Premature end of

script headers: /var/www/cgi-bin/install.cgi

我用的是Red Hat Linux 7.3 + Apache2 + Perl 5.8.0 + PHP 4.2.3

我装了所有的perl.*.rpm包和CGI.pm, 还是一样的结果。 请大家帮忙啊。 :-(


由 北南南北 在 10-18-2002 14:38 发表:


把配制文件发上来,大家研究一下。多谢。。。


===========================

请弟兄们发帖时要写个好标题,多谢!

===========================

每天以1000KM/H的速度在跑,感觉还是时间不够:(

“西学东渐,洋为中用” + 创造 = ?

linux ppc


由 IBICFY 在 10-19-2002 02:52 发表:


下面是我的配置文件。 另外我检查了我的cgi文件的开头路径都是对的(/usr/bin/perl)。

Section 1: Global Environment

ServerRoot "/usr/local/apache"

The accept serialization lock file MUST BE STORED ON

A LOCAL DISK.

1<ifmodule !mpm_winnt.c="">
2<ifmodule !mpm_netware.c="">   
3  
4#LockFile logs/accept.lock   
5  
6</ifmodule>
7</ifmodule>

1<ifmodule !mpm_netware.c="">
2<ifmodule !perchild.c="">   
3  
4#ScoreBoardFile logs/apache_runtime_status   
5  
6</ifmodule>
7</ifmodule>
1<ifmodule !mpm_netware.c="">   
2  
3PidFile logs/httpd.pid   
4  
5</ifmodule>

Timeout: The number of seconds before receives and

sends time out.

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 15

 1<ifmodule prefork.c="">   
 2  
 3StartServers 5   
 4  
 5MinSpareServers 5   
 6  
 7MaxSpareServers 10   
 8  
 9MaxClients 150   
10  
11MaxRequestsPerChild 0   
12  
13</ifmodule>
 1<ifmodule worker.c="">   
 2  
 3StartServers 2   
 4  
 5MaxClients 150   
 6  
 7MinSpareThreads 25   
 8  
 9MaxSpareThreads 75   
10  
11ThreadsPerChild 25   
12  
13MaxRequestsPerChild 0   
14  
15</ifmodule>
 1<ifmodule perchild.c="">   
 2  
 3NumServers 5   
 4  
 5StartThreads 5   
 6  
 7MinSpareThreads 5   
 8  
 9MaxSpareThreads 10   
10  
11MaxThreadsPerChild 20   
12  
13MaxRequestsPerChild 0   
14  
15</ifmodule>
1<ifmodule mpm_winnt.c="">   
2  
3ThreadsPerChild 250   
4  
5MaxRequestsPerChild 0   
6  
7</ifmodule>
1<ifmodule beos.c="">   
2  
3StartThreads 10   
4  
5MaxClients 50   
6  
7MaxRequestsPerThread 10000   
8  
9</ifmodule>
 1<ifmodule mpm_netware.c="">   
 2  
 3ThreadStackSize 65536   
 4  
 5StartThreads 250   
 6  
 7MinSpareThreads 25   
 8  
 9MaxSpareThreads 250   
10  
11MaxThreads 1000   
12  
13MaxRequestsPerChild 0   
14  
15</ifmodule>
 1<ifmodule mpmt_os2.c="">   
 2  
 3StartServers 2   
 4  
 5MinSpareThreads 5   
 6  
 7MaxSpareThreads 10   
 8  
 9MaxRequestsPerChild 0   
10  
11</ifmodule>

#Listen 12.34.56.78:80

Listen 80

Example:

LoadModule foo_module modules/mod_foo.so

LoadModule php4_module modules/libphp4.so

#ExtendedStatus On

Section 2: 'Main' server configuration

 1<ifmodule !mpm_winnt.c="">
 2<ifmodule !mpm_netware.c="">   
 3  
 4  
 5  
 6User nobody   
 7  
 8Group #-1   
 9  
10</ifmodule>
11</ifmodule>

ServerAdmin [email protected]

ServerName 161.44.147.224:80

UseCanonicalName Off

DocumentRoot "/usr/local/apache/htdocs"

1<directory></directory>

Options FollowSymLinks

AllowOverride None

 1<directory "="" apache="" htdocs"="" local="" usr="">   
 2  
 3  
 4  
 5#   
 6  
 7# Possible values for the Options directive are   
 8  
 9"None", "All",   
10  
11# or any combination of:   
12  
13# Indexes Includes FollowSymLinks   
14  
15SymLinksifOwnerMatch ExecCGI Multiviews   
16  
17  
18  
19#   
20  
21Options Indexes FollowSymLinks MultiViews   
22  
23  
24  
25AllowOverride None   
26  
27  
28  
29#   
30  
31# Controls who can get stuff from this server.   
32  
33#   
34  
35Order allow,deny   
36  
37Allow from all   
38  
39  
40  
41</directory>

UserDir public_html

 1<directory *="" home="" public_html="">   
 2  
 3# AllowOverride FileInfo AuthConfig Limit Indexes   
 4  
 5# Options MultiViews Indexes SymLinksIfOwnerMatch   
 6  
 7IncludesNoExec   
 8  
 9# <limit get="" options="" post="" propfind="">   
10  
11# Order allow,deny   
12  
13# Allow from all   
14  
15# </limit>   
16  
17# <limitexcept get="" options="" post="" propfind="">   
18  
19# Order deny,allow   
20  
21# Deny from all   
22  
23# </limitexcept>   
24  
25#</directory>

DirectoryIndex index.htm index.php index.html

index.html.var

AccessFileName .htaccess

1<files "^\\.ht"="" ~="">   
2  
3Order allow,deny   
4  
5Deny from all   
6  
7</files>

TypesConfig conf/mime.types

DefaultType text/plain

1<ifmodule mod_mime_magic.c="">   
2  
3MIMEMagicFile conf/magic   
4  
5</ifmodule>

HostnameLookups Off

#EnableMMAP off

ErrorLog logs/error_log

LogLevel warn

LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i"

"%{User-Agent}i"" combined

LogFormat "%h %l %u %t "%r" %>s %b" common

LogFormat "%{Referer}i -> %U" referer

LogFormat "%{User-agent}i" agent

CustomLog logs/access_log common

#CustomLog logs/referer_log referer

#CustomLog logs/agent_log agent

#CustomLog logs/access_log combined

ServerTokens Full

ServerSignature On

Alias /icons/ "/usr/local/apache/icons/"

 1<directory "="" apache="" icons"="" local="" usr="">   
 2  
 3Options Indexes MultiViews   
 4  
 5AllowOverride None   
 6  
 7Order allow,deny   
 8  
 9Allow from all   
10  
11</directory>

Alias /manual "/usr/local/apache/manual"

 1<directory "="" apache="" local="" manual"="" usr="">   
 2  
 3Options Indexes FollowSymLinks MultiViews   
 4  
 5IncludesNoExec   
 6  
 7AddOutputFilter Includes html   
 8  
 9AllowOverride None   
10  
11Order allow,deny   
12  
13Allow from all   
14  
15</directory>

ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"

 1<ifmodule mod_cgid.c="">   
 2  
 3#   
 4  
 5# Additional to mod_cgid.c settings, mod_cgid has   
 6  
 7Scriptsock <path>   
 8  
 9# for setting UNIX socket for communicating with cgid.   
10  
11#   
12  
13#Scriptsock logs/cgisock   
14  
15</path></ifmodule>

"/usr/local/apache/cgi-bin" should be changed to

whatever your ScriptAliased

CGI directory exists, if you have that configured.

 1<directory "="" apache="" cgi-bin"="" local="" usr="">   
 2  
 3AllowOverride None   
 4  
 5Options ExecCGI   
 6  
 7Order allow,deny   
 8  
 9Allow from all   
10  
11</directory>

IndexOptions FancyIndexing VersionSort

AddIconByEncoding (CMP,/icons/compressed.gif)

x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*

AddIconByType (IMG,/icons/image2.gif) image/*

AddIconByType (SND,/icons/sound2.gif) audio/*

AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe

AddIcon /icons/binhex.gif .hqx

AddIcon /icons/tar.gif .tar

AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv

AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip

AddIcon /icons/a.gif .ps .ai .eps

AddIcon /icons/layout.gif .html .shtml .htm .pdf

AddIcon /icons/text.gif .txt

AddIcon /icons/c.gif .c

AddIcon /icons/p.gif .pl .py

AddIcon /icons/f.gif .for

AddIcon /icons/dvi.gif .dvi

AddIcon /icons/uuencoded.gif .uu

AddIcon /icons/script.gif .conf .sh .shar .csh .ksh

.tcl

AddIcon /icons/tex.gif .tex

AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..

AddIcon /icons/hand.right.gif README

AddIcon /icons/folder.gif ^^DIRECTORY^^

AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README.html

HeaderName HEADER.html

IndexIgnore .??* ~ # HEADER README RCS CVS *,v *,t

AddEncoding x-compress Z

AddEncoding x-gzip gz tgz

DefaultLanguage nl

AddLanguage da .dk

AddLanguage nl .nl

AddLanguage en .en

AddLanguage et .et

AddLanguage fr .fr

AddLanguage de .de

AddLanguage he .he

AddLanguage el .el

AddLanguage it .it

AddLanguage ja .ja

AddLanguage pl .po

AddLanguage ko .ko

AddLanguage pt .pt

AddLanguage nn .nn

AddLanguage no .no

AddLanguage pt-br .pt-br

AddLanguage ltz .ltz

AddLanguage ca .ca

AddLanguage es .es

AddLanguage sv .se

AddLanguage cz .cz

AddLanguage ru .ru

AddLanguage tw .tw

AddLanguage zh-tw .tw

AddLanguage hr .hr

LanguagePriority en da nl et fr de el it ja ko no pl

pt pt-br ltz ca es sv tw

ForceLanguagePriority Prefer Fallback

AddDefaultCharset ISO-8859-1

AddCharset ISO-8859-1 .iso8859-1 .latin1

AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen

AddCharset ISO-8859-3 .iso8859-3 .latin3

AddCharset ISO-8859-4 .iso8859-4 .latin4

AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr

.iso-ru

AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb

AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk

AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb

AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk

AddCharset ISO-2022-JP .iso2022-jp .jis

AddCharset ISO-2022-KR .iso2022-kr .kis

AddCharset ISO-2022-CN .iso2022-cn .cis

AddCharset Big5 .Big5 .big5

For russian, more than one charset

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus