Search code examples
nginxelasticsearchkibana-4

How to configure Nginx server block for kibana4 , when marvel block is already present in the configs


I am having a Ubuntu server machine which has ElasticSearch on it and i have configured marvel over the same machine. I used Nginx as a reverse proxy to access the marvel dashboard from a browser say chrome. It works fine with the following configuration in '/etc/nginx/sites-available/default'

upstream kibana {
    server 127.0.0.1:5601;
}

server {
    listen 80;


    location / {
        proxy_pass http://localhost:9200;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

    location /kibana/ {
    proxy_http_version     1.1;
    proxy_ignore_headers   Cache-Control;
    proxy_pass             http://kibana/;
    proxy_read_timeout     90;
    proxy_redirect         off;
    proxy_set_header       Authorization '';
    proxy_set_header       Connection "";
    proxy_set_header       Host $http_host;
    proxy_set_header       X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header       X-Forwarded-Proto $scheme;
}

}

The above configs let me access the marvel dashboad perfectly by hitting 'public_ip:9200/_plugin/marvel/' on a GUI browser from outside world.

Now i have installed kibana4 on this same machine and need to access the kibanaDashboard over another brower using the public ip , i added the kibana block and saw that i can locally access the kibana webpage fine , but unable to do the same from out side, i.e http://public_ip_of_server/kibana/

I am unable to still get to kibana from outside


Solution

  • Your default is correct .. you can simply access the kibana page now: http://publicip:5601