如何制作清漆循环 zeo 客户端

发布于 2024-11-04 15:46:37 字数 1263 浏览 2 评论 0原文

我想使用 plone.recipe.varnisin buildout 将 varnish 配置为在 2 个 zeo 客户端之间循环。在我的 buildout.cfg 中,我尝试过:

[varnish-build]
recipe = zc.recipe.cmmi
url = http://downloads.sourceforge.net/project/varnish/varnish/2.1.3/varnish-2.1.3.tar.gz

[varnish-instance]
recipe = plone.recipe.varnish
daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
bind = 127.0.0.1:8000
balancer = round-robin
backends =
        client1:127.0.0.1:8080
        client2:127.0.0.1:8081
cache-size = 1G

并且

[varnish-build]
recipe = zc.recipe.cmmi
url = http://downloads.sourceforge.net/project/varnish/varnish/2.1.3/varnish-2.1.3.tar.gz

[varnish-instance]
recipe = plone.recipe.varnish
daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
bind = 127.0.0.1:8000
balancer = round-robin
backends =
        cluster:127.0.0.1:8080
        cluster:127.0.0.1:8081
cache-size = 1G

都不起作用,它们都给我“错误 404 未知虚拟主机”。我可以手动编辑 varnish.vcl

director cluster round-robin {
  { .backend = { .host = "127.0.0.1"; .port = "8080"; } }
  { .backend = { .host = "127.0.0.1"; .port = "8081"; } }
}

,一切都按照我想要的方式工作,除了我想在构建中执行此操作。

我使用统一安装程序 Plone 4.0.5、Ubuntu 10.0.4(64 位)、Varnish 2.1.3。有什么想法吗?谢谢!

I would like to use plone.recipe.varnisin buildout to configure varnish to round-robin between 2 zeo clients. In my buildout.cfg I have tried:

[varnish-build]
recipe = zc.recipe.cmmi
url = http://downloads.sourceforge.net/project/varnish/varnish/2.1.3/varnish-2.1.3.tar.gz

[varnish-instance]
recipe = plone.recipe.varnish
daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
bind = 127.0.0.1:8000
balancer = round-robin
backends =
        client1:127.0.0.1:8080
        client2:127.0.0.1:8081
cache-size = 1G

and

[varnish-build]
recipe = zc.recipe.cmmi
url = http://downloads.sourceforge.net/project/varnish/varnish/2.1.3/varnish-2.1.3.tar.gz

[varnish-instance]
recipe = plone.recipe.varnish
daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
bind = 127.0.0.1:8000
balancer = round-robin
backends =
        cluster:127.0.0.1:8080
        cluster:127.0.0.1:8081
cache-size = 1G

Neither work, they both give me "Error 404 Unknown virtual host". I can manually edit the varnish.vcl to

director cluster round-robin {
  { .backend = { .host = "127.0.0.1"; .port = "8080"; } }
  { .backend = { .host = "127.0.0.1"; .port = "8081"; } }
}

and everything works they way I wwant, except I would like to do this in buildout.

I am using the unified installer Plone 4.0.5, Ubuntu 10.0.4 (64 bit), Varnish 2.1.3. Any ideas? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

古镇旧梦 2024-11-11 15:46:37

请参阅http://pypi.python.org/pypi/plone.recipe.varnish 有关负载平衡的信息。

您还可以使用自定义 varnish.vcl 文件并使用“config”选项指定该文件。我倾向于使用 Collective.recipe.template 来输出 VCL 文件,因为我通常需要一些自定义配置。

See http://pypi.python.org/pypi/plone.recipe.varnish for information about load balancing.

You can also use a custom varnish.vcl file and specify that with the 'config' option. I tend to use collective.recipe.template to output a VCL file, since I usually need some custom configuration anyway.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文