Reputation: 4818
I want to access kibana running on my local system to be accessed by local_ip:5601
on other systems in my local network. I tried adding these two lines in elastic search:
http.cors.allow-origin: "*"
http.cors.enabled: true
But, it didn't work either.
Upvotes: 5
Views: 9405
Reputation: 1
This is how I got it to work:
Vagrantfile:
config.vm.network "forwarded_port", guest: 5601, host: 5602
httpd.conf:
Listen 5602
<VirtualHost *:5602>
ProxyPreserveHost On
ProxyRequests Off
ServerName kibana.mydomain.dev
ProxyPass / http://127.0.0.1:5601/
ProxyPassReverse / http://127.0.0.1:5601/
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
Upvotes: 0
Reputation: 21
See this related question: vagrants-port-forwarding-not-working
I was working with Kibana in a Centos 7 Vagrant VM. I was not able to access the Kibana webui from the Host computer.
Stopping firewalld and disabling SELinux did not do the trick.
My VM ip address was 192.168.2.2, so I tested with curl http://92.168.2.2:5601/
and it would work from within the VM, but not from the Host CLI.
I tested that port forwarding was working by installing Apache in the VM and could access it from the Host browser with http://localhost:80
, so port forwarding was not the problem.
My problem was the server.host parameter in the kibana.yml configuration file, which I had set to the ip address of the VM.
I changed it from this:
server.host: "192.168.2.2"
to this:
server.host: "0.0.0.0"
restarted kibana and could access the webui from the Host.
Upvotes: 0
Reputation: 1965
On your kibana.yml look for the line #server.host: "0.0.0.0"
. It will probably be commented (#). You must remove the "#" from the line and restart your kibana service. It should allow you to access kibana from your local network ip e.g. "192.168.10.20" and make it discoverable by your other systems.
On that same file kibana.yml you will find an url that points to "http://localhost:9200" by default. If your elasticsearch instance is hosted in any different url than that, you must specify to kibana config file.
You can find more information about it here
Upvotes: 11