我想从/var/www/html/ cgi和/var/www/html/s1/cgi执行cgi文件。我现在的httpd.conf里有这个
Options Indexes FollowSymLinks ExecCGI
ScriptAlias /cgi-bin/ "/var/www/html/cgi-bin/"
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>/var/www/html/ Cgi -bin中的cgi文件工作得很好,但是当我试图执行/var/www/html/s1/cgi/test.cgi时,会出现错误,说明我无法执行目录/var/www/cgi,而且/var/www/cgi/test.cgi不存在。
我怎样才能解决这个问题?
发布于 2011-09-05 02:57:05
通过添加到httpd.conf使其工作
<Directory "/var/www/html/s1/cgi-bin">
Options +ExecCGI -Indexes
AddHandler cgi-script cgi pl
</Directory>发布于 2011-09-05 00:03:35
确保ScriptAlias位置在"mod_alias“指令中。(标签)。
<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"
</IfModule>编辑:当然使用linux文件夹系统,而不是"C:/“等等。
https://serverfault.com/questions/308142
复制相似问题