我正在尝试在OSX上设置Mercurial Web服务器。 我遵循了这个程序:http://devravenio.blogspot.be/2013/02/set-up-mercurial-server-on-mac-os-x.html
所以我创建了一个/ var / hg文件夹,里面有这些文件:
当我像这样运行网络服务器时:
https://localhost/hg/MyRepo
我收到此错误
[error] [client 10.0.27.146] client denied by server configuration: /var/hg/hgweb.cgi
这是hgweb.cgi的内容
#!/usr/bin/env python
#
# send python tracebacks to the browser if an error occurs:
import cgitb
cgitb.enable()
# An example CGI script to export multiple hgweb repos, edit as necessary
# adjust python path if not a system-wide install:
import sys
#input mercurial path
sys.path.insert(0, "/Library/python/2.7/site-packages/mercurial")
# enable importing on demand to reduce startup time
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb.hgwebdir_mod import hgwebdir
import mercurial.hgweb.wsgicgi as wsgicgi
application = hgwebdir('hgweb.config')
wsgicgi.launch(application)
这是我的hgweb.config
#hgweb.config
[paths]
MyRepo = /var/hg/MyRepo
[web]
#visiting the given URL paths or including subrepositories
descend = True
allow_push = *
push_ssl = true
#for http://example.com/hg
baseurl = /hg
#for http://hg.example.com
#baseurl =
我也提出了这些权利:
chown -R _www:_www /var/hg
chmod -R g+rw /var/hg
chmod -R g+x /var/hg
chmod -R g+x /var/hg/*
chmod -R g+x /var/hg/*/.hg
有人可以帮我解决这个问题吗?