logo image

Configuring Nginx reverse proxy for Kibana on Ubuntu 16.04

Views: 80

Rather exposing 5601 port of kibana, you can serve the kibana on firewall friendly 80 port using Nginx. This tutorial shows you how to configure Nginx to serve Kibana on 80 port

Lets start with installing Nginx on your machine. Run the following commands to install Nginx

sudo apt-get update
sudo apt-get install nginx

Now create configuration for Kibana on Nginx by running the following commands

cd /etc/nginx/sites-available
sudo touch kibana
sudo vi kibana

Now paste the following configuration in the file

server {

server_name localhost;
access_log /var/log/nginx/localhost.log;

location / {
    proxy_pass http://localhost:5601;
    proxy_read_timeout 90;

Now create a link in sites-enabled by running the following command

sudo ln -s /etc/nginx/sites-available/kibana  /etc/nginx/sites-enabled/kibana

You are now done with the setup, finally restart Nginx by running following command

sudo service nginx restart

Thats it, Now tou should be able to access the Kibana on 80 port