Apache 当访问远程Mercurial服务器时,我只得到hgweb.cgi python脚本的打印输出

Apache 当访问远程Mercurial服务器时,我只得到hgweb.cgi python脚本的打印输出,apache,ubuntu,mercurial,Apache,Ubuntu,Mercurial,我正试图重建我的香蕉皮服务器一个灾难性的硬盘故障。我已经备份了所有的存储库,但是我无法让web服务器在Armbian Linux上工作(它本质上是Ubuntu,只用于小的ARM板) 我已按照这里的说明: 但是,当我转到pi/hg时,之前我会得到所有存储库的列表,而我只会得到打印出来的hgweb.cgi脚本: #!/usr/bin/env python # # An example hgweb CGI script, edit as necessary # See also http://mer

我正试图重建我的香蕉皮服务器一个灾难性的硬盘故障。我已经备份了所有的存储库,但是我无法让web服务器在Armbian Linux上工作(它本质上是Ubuntu,只用于小的ARM板)

我已按照这里的说明:

但是,当我转到pi/hg时,之前我会得到所有存储库的列表,而我只会得到打印出来的hgweb.cgi脚本:

#!/usr/bin/env python
#
# An example hgweb CGI script, edit as necessary
# See also http://mercurial.selenic.com/wiki/PublishingRepositories

# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "hgweb.config"

# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):
#import sys; sys.path.insert(0, "/path/to/python/lib")

# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb; cgitb.enable()

from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb(config)
wsgicgi.launch(application)
当然,我不能从远程机器推送到存储库,我得到一个错误404

我想那个脚本就是我之前运行的脚本。它看起来与Mercurial安装中的示例相同,但有:

config = "hgweb.config"
因此,问题是:

那剧本看起来对吗? 我是否应该安装wsgicgi工作的东西。我真的应该用这个吗? 您需要任何其他信息来解决此问题吗


非常感谢。

FWIW,我发现其他人也有类似的问题,他们改成了hgweb.wsgi,所以我尝试了一下,它成功了。也许mercurial和/或apache的更高版本不喜欢旧的方法