hiding port with a path – nginx

I have kibana running on port 9292 on localhost. What I want to achieve is when i type http://ip_adress/kibana the page from port 9292 will be loaded but path will remain http://ip_address/kibana/index.html#/dashboard/file/default.json what I get instead is http://ip_adress:9292/index.html#/dashboard/file/default.json

here is my code:

server {
    location /kibana {
         return 301 /kibana/;
    location ~ /kibana/(.*) {   
            error_log /var/log/nginx/kibana-error.log debug;
            proxy_pass   http://ip_address:9292/$1;

Source: ubuntu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.