可通过公共(public) IP 获得 Elasticsearch 头插件

标签 elasticsearch azure-virtual-machine elasticsearch-head

我在 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/

相关文章:

elasticsearch - 如何处理多词同义词

elasticsearch - 这个ansible错误是什么意思?

azure - SSL 在 Windows Azure 虚拟机中如何工作?

azure - 30 天后自动终止 Azure VM

elasticsearch - elasticsearch-head在浏览器中看不到

elasticsearch - 休眠搜索索引注释是否支持Elastic Search的 'copy_to'属性

azure - 如何让相机在 Azure 虚拟机上工作

authentication - 无法使用bin/plugin工具(elasticsearch)安装Head插件

java - elasticsearch无法安装head插件

java - Flume + ElasticSearch 接收器 TTL