Macos ExecCGI在此目录中已关闭
我试图在Mac的web服务器上运行python cgi脚本。每次访问文件@localhost/site.py时,我都会收到一个403禁止的错误 我在查看Apache的错误日志,它说:Macos ExecCGI在此目录中已关闭,macos,apache,cgi,Macos,Apache,Cgi,我试图在Mac的web服务器上运行python cgi脚本。每次访问文件@localhost/site.py时,我都会收到一个403禁止的错误 我在查看Apache的错误日志,它说: [Mon Jun 11 09:52:42 2012] [error] [client ::1] Options ExecCGI is off in this directory: /Users/<username>/Sites/site.py [Mon Jun 11 09:52:42 2012][er
[Mon Jun 11 09:52:42 2012] [error] [client ::1] Options ExecCGI is off in this directory: /Users/<username>/Sites/site.py
[Mon Jun 11 09:52:42 2012][error][client::1]Options ExecCGI在此目录中处于禁用状态:/Users//Sites/site.py
我已经更改了httpd.conf文件,因此我的文档根目录是/Users//Sites
在用户的.conf文件中,我有以下内容:
<Directory "/Users/<username>/Sites/">
Options All
AllowOverride All
Order allow,deny
Allow from all
AddHandler cgi-script .py
</Directory>
选项全部
允许超越所有
命令允许,拒绝
通融
AddHandler cgi脚本.py
当我允许用户的.conf文件中的所有选项时,为什么它告诉我ExecCGI已关闭?您可能必须指定和/或向httpd.conf添加脚本别名 这是我的在窗户上的样子
<IfModule alias_module>
#other comments removed
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"
</IfModule>
#删除其他评论
ScriptAlias/cgi-bin/“C:/Program Files/Apache软件基金会/Apache2.2/cgi-bin/”
我没有指向特定用户文件的设置。