我在 Azure VM 中运行的 Ubuntu 16.04.3 LTS 上使用 Elasticsearch 5.6.2。
我已经克隆、构建并启动了 Elasticsearch 头,如此处所述 - https://github.com/mobz/elasticsearch-head#running-with-built-in-server
之后 HEAD 似乎在 http://localhost:9100/ 上运行仅限,但我需要它在 http://public_ip:9100/ 上可用也是。
我该怎么做?
最佳答案
在您的 GruntFile 中替换此代码:
connect: {
server: {
options: {
port: 9100,
base: '.',
keepalive: true
}
}
}
和:
connect: {
server: {
options: {
hostname:'<your_host_name>',
port: 9100,
base: '.',
keepalive: true
}
}
}
然后重新运行你的 head 插件。对于大多数云平台,主机名是实例的私有(private) IP。
关于可通过公共(public) IP 获得 Elasticsearch 头插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46520926/