您可能需要激活 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/"