Rhodecode apache proxy作为子目录问题

时间:2013-04-10 17:49:56

标签: apache ubuntu virtual-machine rhodecode

我正在Windows Server上的vm(vmware)中运行Ubuntu 12.04服务器。我在vm上运行Rhodecode。我可以通过其IPAddress从主机访问RhodeCode,并且运行端口RHodecode(102.168.226.128:5000)但无法从网络上的另一台机器访问它。为了解决这个问题,我试图使用apache代理作为子目录(同事建议这一点)但是我遇到了问题。我将以下代码添加到production.ini

filter-with = proxy-prefix (in [app.main])

[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
prefix = /<rhodecode> (at the end of the file)

当我尝试构建数据库时(sudo paster setup-rhodecode production.ini) 我收到以下错误: “main”部分不是应用程序(可能是过滤器)。您应该添加#section_name,其中section_name是配置应用程序的部分

我在这里做错了什么?

1 个答案:

答案 0 :(得分:0)

可能你没有做错任何事,但请在你的production.ini

中试试
[filter-app:main]
# instead of filter:proxy-prefix
use = egg:PasteDeploy#prefix
prefix = /scm
next = rh

[app:rh] 
# instead of app:main
use = egg:rhodecode

然后使用

生成设置
paster setup-rhodecode production.ini#rh

我遇到了与问题中描述的问题相同的问题,我偶然发现a post from Ian Bicking(我改编为Rhodecode配置):

  

您必须使用setup-app引用[app:*]部分。所以,如果你   有类似的东西:

[filter-app:main]
use = something
next = myapp

[app:myapp]
blah
     

然后你必须做贴片setup-app deploy.ini#myapp