哪位高手帮我看看是什么问题下面是error_log的内容.
[Sun May 04 05:26:10 2008] [notice] FastCGI: process manager initialized (pid 6901)
[Sun May 04 05:26:10 2008] [notice] Apache/2.2.4 (Unix) mod_fastcgi/2.4.6 configured -- resuming normal operations
[Sun May 04 05:26:30 2008] [error] [client 192.168.4.1] (2)No such file or directory: exec of '/usr/local/apache/cgi/index.cgi' fail
ed
[Sun May 04 05:26:30 2008] [error] [client 192.168.4.1] Premature end of script headers: index.cgi
页面显示-------------------------------------------------------------------
网站拒绝显示此网页
HTTP 403
最可能的原因是:
此网站要求您登录。
您可以尝试以下 *** 作:
返回到上一页。
更多信息
此错误(HTTP 403 禁止)表示此程序可以连接到该网站,但是没有查看该网页的权限。
把cgi的读写权限赋予apache运行账户
已经是啦.
我建了一个vmail用户和组创建方法;
groupadd vmail
useradd -g vmail -s /bin/false -M vmail
然后在httpd.conf文件里把
User vmail
Group vmail
改成上面的.
到cgi这个目录也改了.
chgrp vmail /usr/local/apache/cgi
chown vmail /usr/local/apache/cgi
chmod +777 /usr/local/apache/cgi
我是这样做的.
可以就是出现上面的问题.
我把httpd.conf都贴出来吧.
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here>
要把上面各级目录的权限也要改:
chmod +777 /usr/
chmod +777 /usr/local/
chmod +777 /usr/local/apache
chmod +777 /usr/local/apache/cgi -R
Good Luck!
=-=
那有那麼複雜 ...
1. 目錄 需有 Options ExecCGI
2. CGI 程式需具可執行狀態
3. 需 AddHandler cgi-script .cgi
4. CGI 程式需自行產生 Content-Type 相關訊息
5. command mode 上先確認 CGI 程式不會有執行上的錯誤
会员注册
会员登录
个人空间