Kibana behind nginx relative path

Hi there!

Trying to achieve working kibana behing nginx relative path. Mydomain.com/kibana and it is not working.

Mine docker-compose.yml

kibana:
    image: reg.registry/only/kibana:7.11.2
    environment:
      - SERVER_BASEPATH=/kibana
      - ELASTICSEARCH_USERNAME=elastic
      - ELASTICSEARCH_PASSWORD=xxxxx
      - ELASTICSEARCH_REQUESTTIMEOUT=90000
      - ELASTICSEARCH_URL=http://elasticsearch:9200
      - ELASTICSEARCH_HOSTS=http://elasticsearch:9200
    networks:
     - es
    depends_on:
    - elasticsearch

In kibana.yml I have:
csp.strict: false

And nginx.conf:

    location /kibana {
       rewrite ^/kibana/(.*)$ $1 break;
        proxy_pass http://kibana:5601;
        proxy_redirect off;
        proxy_buffering off;
        proxy_http_version 1.1;
        proxy_set_header Connection "Keep-Alive";
        proxy_set_header Proxy-Connection "Keep-Alive";
  }

When going /kibana there is 502 gateway error..

What did I miss there? Thanks for any help in advance!

Hi @hookenful ,

Is http://kibana:5601 available to the machine where nginx is currently installed?

Cheers

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.