1

我使用 vagrant(带有 Ubuntu 的盒子)。我在上面安装了 Elasticsearch。它可在

localhost:9200 

在我的 Ubuntu 中。漫威可在

http://localhost:9200/_plugin/marvel/

如何在我的主机上进入 Marvel?我通常使用以下代码为我的站点创建虚拟主机:

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    ServerName some.192.168.56.56.xip.io

    DocumentRoot /var/www/some

    <Directory /var/www/some>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/some-192.168.56.56.xip.io-error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/some-192.168.56.56.xip.io-access.log combined


</VirtualHost>
4

1 回答 1

1

根本不需要使用虚拟主机。通过 Vagrant 使用 elasticsearch 唯一需要做的事情:

1) Vagrantfile 中的 'config.vm.network :forwarded_port, guest: 9200, host: 9200'

2)需要在 ES 配置中添加 'network.bind_host: 0.0.0.0 ' (我在这里有 'localhost' - 那是我的问题)

3) 重启 Elasticsearch。

于 2014-09-12T19:59:38.117 回答