如何从外部访问领事UI [英] How to access externally to consul UI

查看:97
本文介绍了如何从外部访问领事UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从外部访问领事UI?

How can I access to consul UI externally?

我想访问领事UI编写

< ANY_MASTER_OR_SLAVE_NODE_IP>:8500

我尝试通过ssh隧道访问:
ssh -N -f -L 8500:localhost:8500 root@172.16.8.194

I have try doing a ssh tunnel to acces: ssh -N -f -L 8500:localhost:8500 root@172.16.8.194

然后如果我访问 http:/ / localhost:8500
它可以工作,但这不是我想要的。我需要从外部访问,而无需ssh隧道。

Then if I access http://localhost:8500 It works, but it is not what I want. I need to access externally, without ssh tunnel.

下一个是我的config.json文件:

My config.json file is the next:

{
"bind_addr":"172.16.8.216",
"server": false,
"datacenter": "nyc2",
"data_dir": "/var/consul",
"ui_dir": "/home/ikerlan/dist",
"log_level": "INFO",
"enable_syslog": true,
"start_join": ["172.16.8.211","172.16.8.212","172.16.8.213"]
}

有什么帮助吗?
谢谢

Any help? Thanks

推荐答案

添加

{
  "client_addr": "0.0.0.0"
}

进行配置,或在领事的命令行中添加选项 -client 0.0.0.0 ,以使Web UI可以从外部访问(有关详细信息,请参阅文档)。

to your configuration or add the option -client 0.0.0.0 to the command line of consul to make your Web UI accessible from the outside (see the docs for more information).

请注意,还可以从外部访问Consul REST API。根据您的环境,您可能需要激活Consul的ACL来限制访问权限。

Please note that this will also make your Consul REST API accessible from the outside. Depending on your environment you might want to activate Consul's ACLs to restrict access.

这篇关于如何从外部访问领事UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆