【发布时间】:2020-08-15 17:18:20
【问题描述】:
我正在尝试重建我的 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)
当然我不能从远程机器推送到存储库,我收到错误 404。
我认为该脚本是我之前运行的脚本。它看起来与 Mercurial 安装中的示例相同,但具有:
config = "hgweb.config"
所以,问题是:
该脚本看起来正确吗? 我是否应该安装一些东西让 wsgicgi 工作。事实上,我什至应该使用它吗? 您需要任何其他信息来解决此问题吗?
非常感谢。
【问题讨论】: