指定不同机器的host后,还是获取不到数据,存在跨域请求的问题!
due to cross site origin limitations, the dashboard will only work if it's on the same subdomain as varnish agent (meaning you must use it with the -h option of varnish agent, preventing the usage of multiple servers). i've submitted a patch to varnish agent to fix this, but until it's merged, only one varnish backend is supported.
######谢谢回答。等待补丁。。######
var config = { | |
servers: [{ | |
name: "Varnish", | |
host: null, | |
port: 6085, | |
user: "varnish_agent_user", | |
pass: "varnish_agent_pass" | |
}], |
var config = { servers: [ { name: 'VarnishDev1', host: '1.1.1.1', port: 6085, user: 'user', pass: 'pass' }, { name: 'VarnishDev2', host: '2.2.2.2', port: 6085, user: 'user', pass: 'pass' }, { name: 'VarnishProd1', host: '3.3.3.3', port: 6085, user: 'user', pass: 'pass' }, { name: 'VarnishProd2', host: '4.4.4.4', port: 6085, user: 'user', pass: 'pass' } ], groups: [ { name: 'dev', servers: [ 'VarnishDev1', 'VarnishDev2', ] }, { name: 'prod', servers: [ 'VarnishProd1', 'VarnishProd2', ] } ], update_freq: 2000, max_points: 100, default_log_fetch: 100000, default_log_display: 100, show_bans_page: true, show_manage_server_page: true, show_vcl_page: true, show_stats_page: true, show_params_page: true, show_logs_page: true, show_restart_varnish_btn: true };
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。