2017-04-04 33 views
0

使用ifconfig顯示在iMac上,訪問本地IP地址上的elasticsearch和neo4j端口?

INET 192.168.10.1

我可以訪問

http://localhost/

http://127.0.0.1/

http://192.168.10.1

他們都是一樣的。

我還可以在以下網址訪問的Neo4j和elasticsearch港口

Elasticsearch

http://127.0.0.1:9200/

http://localhost:9200/

Neo4j的

http://127.0.0.1:7474/browser/

http://localhost:7474/browser/

但端口9200和7474沒有工作192.168.10.1

http://192.168.10.1:9200

http://192.168.10.1:7474

東西,我需要做使端口7474(Neo4j的)和9200(elasticsearch)工作爲192.168.10.1,但我不知道如何。

請指教,謝謝!

回答

0

我想通了。

Neo4j的

設置的Neo4j上的IP(除本地主機),在我的情況

http://192.168.10.1:7474 

在neo4j.conf文件

下面一行的註解。

# With default configuration Neo4j only accepts local connections. 
# To accept non-local connections, uncomment this line: 
dbms.connectors.default_listen_address=0.0.0.0 

Elasticsearch

修改elasticsearch.yml

添加以下行

network.host: 0.0.0.0 

然後開始elasticsearch。