【发布时间】:2010-10-17 11:40:33
【问题描述】:
我已经在 /home/adil/hg/sample-repo 设置了我的 repo,并希望通过 httpd 提供它。我正在关注https://www.mercurial-scm.org/wiki/PublishingRepositories#multiple 的教程并创建了 hgweb.config 文件并将 hgweb.cgi(重命名为 index.cgi)复制到 /home/adil/web/mercurial/
我的 apache 配置(/etc/httpd/conf/httpd.conf)如下所示:
ScriptAlias /hg "/home/adil/web/mercurial/index.cgi"
<Directory "/home/adil/web/mercurial">
Order allow,deny
Allow from all
AllowOverride All
Options ExecCGI
AddHandler cgi-script .cgi
</Directory>
index.cgi、hgweb.config 和所有向上的目录都具有全局读取权限
http://localhost/hg 给出“403 Forbidden”错误。怎么回事?
PS:Apache 错误日志显示: [Sun Oct 17 06:45:38 2010] [error] [client 1.2.3.4] (13)Permission denied: access to /hg denied
【问题讨论】:
-
error.log 文件说明了什么?它可能包含有关拒绝访问原因的更详细信息
-
我用错误消息更新了我的问题。如上所述,只是权限被拒绝。它没有提供更多信息。
-
我会用更多方法来更新答案来检查 Apache 的用户。
标签: apache mercurial http-status-code-403 hgweb