# Kibana returns "statusCode": 404 in simple docker stack

**URL:** <https://discuss.elastic.co/t/kibana-returns-statuscode-404-in-simple-docker-stack/338545>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [July 17, 2023, 11:56am UTC](https://discuss.elastic.co/t/kibana-returns-statuscode-404-in-simple-docker-stack/338545 "2023-07-17T11:56:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vojtech-cerveny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vojtech-cerveny/32/123126_2.png) [@vojtech-cerveny](https://discuss.elastic.co/u/vojtech-cerveny)\
**Post date:** [July 17, 2023, 11:56am UTC](https://discuss.elastic.co/t/kibana-returns-statuscode-404-in-simple-docker-stack/338545/1 "2023-07-17T11:56:57Z")

</div>

Hey,  
I have this simple stack of Elasticsearch + Kibana + Nginx for SSL. And I am not sure why Kibana returns on `example.com:4444/kibana` this response:

```auto
{
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}

```

Can anybody see problem what I have here? I am able to see correct result from elasticsearch, but I have no success with kibana yet. Any advice is welcomed!

**STACK:**

- command: `docker compose -f docker-stack.yml up`

- my `docker-stack.yml`

```auto
version: '3'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
    container_name: elasticsearch
    environment:
      - "discovery.type=single-node"
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - bootstrap.memory_lock=true
      - "xpack.security.enabled=false"
      - "ELASTIC_PASSWORD=XXX"
    volumes:
      - esdata:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    restart: on-failure

  kibana:
    image: docker.elastic.co/kibana/kibana:8.8.0
    container_name: kibana
    ports:
      - 5601:5601
    restart: on-failure
    environment:
      ELASTICSEARCH_HOSTS: http://elasticsearch:9200
      ELASTICSEARCH_PASSWORD: "XXX"
      "server.basePath": "/kibana"
      "server.rewriteBasePath": "true"
    depends_on:
      - elasticsearch
  nginx:
    image: nginx
    container_name: nginx
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
      - ./certs:/etc/own-certs/certs
    ports:
      - 4444:4444
    depends_on:
      - kibana
volumes:
  esdata:
    driver: local

```

- `nginx.conf`

```auto
events {
    worker_connections 1024;
}

http {
    server {
        listen 4444 ssl;
        server_name example.com;

        ssl_certificate /etc/own-certs/certs/fullchain.crt;
        ssl_certificate_key /etc/own-certs/certs/server.key;

        location /elasticsearch {
            proxy_pass http://elasticsearch:9200/;
            proxy_redirect off;
            proxy_buffering off;
            proxy_http_version 1.1;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header Connection "Keep-Alive";
            proxy_set_header Proxy-Connection "Keep-Alive";
            proxy_pass_header Access-Control-Allow-Origin;
            proxy_pass_header Access-Control-Allow-Methods;
            proxy_hide_header Access-Control-Allow-Headers;
            add_header Access-Control-Allow-Headers 'X-Requested-With, Content-Type';
            add_header Access-Control-Allow-Credentials true;
        }

        location /kibana {
            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";
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [July 18, 2023, 2:34pm UTC](https://discuss.elastic.co/t/kibana-returns-statuscode-404-in-simple-docker-stack/338545/2 "2023-07-18T14:34:31Z")

</div>

Is there anything showing up on the 5601? That would be my first step in troubleshooting.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 15, 2023, 2:35pm UTC](https://discuss.elastic.co/t/kibana-returns-statuscode-404-in-simple-docker-stack/338545/3 "2023-08-15T14:35:04Z")

</div>

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