【发布时间】:2011-08-24 20:33:23
【问题描述】:
我尝试在 Windows 7 上使用 Apache 配置 Mercurial。它在首页上很好地显示了存储库列表。但是当我浏览某个存储库时,它会显示以以下开头的 html 代码:
Status: 200 Script output follows
ETag: 1305209648.82
Content-Type: text/html; charset=cp1252
我认为这是一个带有 MIME 类型的 Apache 服务器的问题。我在 Apache 服务器中使用 ForceType 更改它。好的,它以某种方式呈现了 html 页面,但页面上仍然显示相同的标题。 我可以使用 cmd 中的 hg 命令更改存储库。当我通过 Web 界面浏览它时,它也反映在 Apache 服务器上。但是我不能从存储库中推送、拉取,也不能从存储库中克隆。我的 hgWebConfig 是:
[collections]
c:\webdir\repository\ = c:\webdir\repository\
[web]
allow_push = *
allow_pull = *
push_ssl = false
allow_archive = bz2 gz zip
我要发布的存储库位于 c:\webdir\repository 中。而 hgweb.cgi 位于 c:\webdir。 Apache的配置是这样的:
ScriptAlias / c:/webdir/index.cgi/
<Directory "C:/webdir/">
AddHandler cgi-script .cgi .html .xhtml
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
最好的问候, 沙希德·阿克拉姆
【问题讨论】:
标签: mercurial