0

我正在尝试帮助一个朋友重新设计他的使用 PHP 的电子商务网站(或者至少我假设它是 PHP)。我在本地获得了该网站的副本,并试图在 MAMP 中运行它。

我将网站复制到 htdocs 文件夹中,并且可以正常访问索引页面。当我尝试登录时,我收到错误:

 Not Found

 The requested URL /cgi-bin/commerce.cgi was not found on this server.

我知道 .cgi 文件在那里。我与 MAMP 有什么特别的关系才能让它正常运行吗?

非常感谢。

4

1 回答 1

0

您可能需要激活 cgi。如果您使用 MAMP Pro,在主机设置 - 高级选项卡中有一个特殊选项用于启用 ExecCGI。

如果您不使用 MAMP Pro,则必须在 apache https.conf 文件中检查:

MAMP_cgi_module_MAMPLoadModule cgi_module modules/mod_cgi.so

#
# ScriptAlias: This controls which directories contain server scripts. 
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target 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/ "/Applications/MAMP/cgi-bin/"
于 2014-03-09T10:38:13.927 回答