由 scqln 在 11-08-2004 10:49 发表:
怎么让apache 支持cgi?
我想让apache 支持 perl 运行, 我就改了一下httpd.conf 如下:
......
ScriptAlias: This controls which directories contain server scripts.
ScriptAliases are essentially the same as Aliases, except that
documents in the realname directory are treated as applications and
run by the server when requested rather than as documents sent to the client.
The same rules about trailing "/" apply to ScriptAlias directives as to
Alias.
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.
AddHandler cgi-script .cgi .pl
1<directory "="" cgi-bin"="" html="" var="" www="">
2
3AllowOverride None
4
5Options ExecCGI
6
7Order allow,deny
8
9Allow from all
10
11</directory>
.....
当我运行我的perl是, 它提示说:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
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