我正在尝试将Banana Pi服务器重建为灾难性的HDD故障。我已经备份了所有存储库,但是我无法使Web服务器在Armbian Linux(本质上是Ubuntu,仅用于少量ARM板)上工作。
我已按照此处的说明进行操作:
https://www.mercurial-scm.org/wiki/HgWebDirStepByStep
但是当我转到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)
我认为该脚本是我以前运行的脚本。它看起来与Mercurial安装中的示例相同,但具有:
config = "hgweb.config"
所以,问题是:
该脚本看起来正确吗? 我应该安装一些使wsgicgi正常工作的东西吗?确实,我应该使用它吗? 您还需要其他信息来解决此问题吗?
非常感谢。