Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在nearlyfreespeech上设置mercurial web界面_Web_Mercurial_Dvcs_Hgweb_Nearlyfreespeech - Fatal编程技术网

在nearlyfreespeech上设置mercurial web界面

在nearlyfreespeech上设置mercurial web界面,web,mercurial,dvcs,hgweb,nearlyfreespeech,Web,Mercurial,Dvcs,Hgweb,Nearlyfreespeech,我最近一直在努力将我的网络主机设置为用于mercurial回购和hgweb。我使用(NFSN)作为主机 默认情况下,NFSN有一个CGI领域freebsd72,并限制您只使用CGI,而不使用WGSI或类似的内容。最初,NFSN安装了mercurial 1.6,但通过松散地遵循说明,我能够安装mercurial 2.6。Python 2.6.6也默认安装在主机上,我将其保持原样 我现在的问题是无法在浏览器中加载hgweb.cgi文件。当我在我的主机上通过SSH运行它时,它运行良好并输出HTML,但

我最近一直在努力将我的网络主机设置为用于mercurial回购和hgweb。我使用(NFSN)作为主机

默认情况下,NFSN有一个CGI领域freebsd72,并限制您只使用CGI,而不使用WGSI或类似的内容。最初,NFSN安装了mercurial 1.6,但通过松散地遵循说明,我能够安装mercurial 2.6。Python 2.6.6也默认安装在主机上,我将其保持原样

我现在的问题是无法在浏览器中加载hgweb.cgi文件。当我在我的主机上通过SSH运行它时,它运行良好并输出HTML,但在我的浏览器中,我得到一个500内部服务器错误。该文件是可执行的,并且启用了CGI。我不知道还有什么要检查的。。。是否有人对在NFSN上使用hg和hgweb有任何建议或经验

正如在评论中所建议的,我检查了创建的错误日志,发现当我访问该站点时,我得到

[Sun Jun 16 08:22:31 2013] [error] [client 172.17.0.141] CGI ERROR: A system problem prevented your request from being completed.
[Sun Jun 16 08:22:31 2013] [error] [client 172.17.0.141] Premature end of script headers: hgweb.cgi
对该错误进行一些搜索后发现,这意味着脚本在运行时可能没有生成正确的头。如果我将脚本的输出保存到一个文件中,我会得到以下结果

Status: 200 Script output follows
Content-Type: text/html; charset=US-ASCII

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />

<title>Mercurial repositories index</title>
</head>
<body>

<div class="container">
<div class="menu">
<a href="http://mercurial.selenic.com/">
<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
</div>
<div class="main">
<h2>Mercurial Repositories</h2>

<table class="bigtable">
    <tr>
        <th><a href="?sort=name">Name</a></th>
        <th><a href="?sort=description">Description</a></th>
        <th><a href="?sort=contact">Contact</a></th>
        <th><a href="?sort=lastchange">Last modified</a></th>
        <th>&nbsp;</th>
    </tr>

</table>
</div>
</div>

</body>
</html>
状态:接下来是200个脚本输出
内容类型:text/html;字符集=US-ASCII
Mercurial存储库索引
Mercurial存储库

我发现hgweb.cgi脚本实际上需要设置为755个权限,将其设置为可执行权限是不够的。

我发现hgweb.cgi脚本实际上需要设置为755个权限,将其设置为可执行权限是不够的。

某个web服务器日志中应该有错误。您是否通过Apache运行CGI?请查看错误日志。@djc我更新了我的帖子以包含日志输出。除了将配置路径更改为我的站点的本地目录之外,我没有更改任何默认的scrips。web服务器日志中的某个地方应该有错误。您是否通过Apache运行CGI?请查看错误日志。@djc我更新了我的帖子以包含日志输出。除了将配置路径更改为站点的本地目录外,我没有更改任何默认的scrips