如何制作清漆循环 zeo 客户端
我想使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅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.