# Unable to get Kibana working under subdomain

**URL:** https://discuss.elastic.co/t/unable-to-get-kibana-working-under-subdomain/240112
**Category:** Kibana
**Created:** [July 7, 2020, 7:40am UTC](https://discuss.elastic.co/t/unable-to-get-kibana-working-under-subdomain/240112 "2020-07-07T07:40:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jacktaaniels](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jacktaaniels/32/71596_2.png) [@jacktaaniels](https://discuss.elastic.co/u/jacktaaniels)
#### Post date: [July 7, 2020, 7:40am UTC](https://discuss.elastic.co/t/unable-to-get-kibana-working-under-subdomain/240112/1 "2020-07-07T07:40:47Z")

</div>

Hello,

I am trying to set up Kibana with Nginx using ubuntu 18.04 LTS. I am using an alias for Kibana, e.g. [kibana.mydomain.com](http://kibana.mydomain.com). Under the domain root, I want to have a different application running. Kibana service itself is running ("Server running at localhost:5601"), as is elasticsearch, but when checking netstat -t -u then I don't see the port in the list. Nginx configuration (with certbot SSL) is as follows:

```auto
    server {
     server_name [kibana.mydomain.com](http://kibana.mydomain.com/);
     auth_basic "Restricted Access";
     auth_basic_user_file /etc/nginx/htpasswd.users;
     location / {
       proxy_pass [http://localhost:5601](http://localhost:5601/);
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Host $host;
       proxy_cache_bypass $http_upgrade;
     }
     listen 443 ssl; # managed by Certbot
     ssl_certificate /etc/letsencrypt/live/[mydomain.com/fullchain.pem] 
     (http://mydomain.com/fullchain.pem); # managed by Certbot
     ssl_certificate_key /etc/letsencrypt/live/[mydomain.com/privkey.pem] 
     (http://mydomain.com/privkey.pem); # managed by Certbot

     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
     }
     server
     {
      if ($host = [kibana.mydomain.com](http://kibana.mydomain.com/)) {
        return 301 https://$host$request_uri;
     } # managed by Certbot
     listen 80;
     server_name [kibana.mydomain.com](http://kibana.mydomain.com/);
     return 404; # managed by Certbot
    }

```

Please advise - what else should I check? Nginx successfully asks for the username/password when trying to access the site, but after authentication, it returns a 500 server error.

Thank you in advance.

---

<div class="post-metadata">

### Author: ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)
#### Post date: [July 7, 2020, 3:38pm UTC](https://discuss.elastic.co/t/unable-to-get-kibana-working-under-subdomain/240112/2 "2020-07-07T15:38:02Z")

</div>

The Kibana server logs should provide more information on the version conflicts if any. Plz check that . By default, Kibana logs to `stdout` . You can take a look at the [configuration settings](https://www.elastic.co/guide/en/kibana/current/settings.html) to see how you can change this to log to a file. Pleas see [this version compatibility chart](https://github.com/elastic/kibana#version-compatibility-with-elasticsearch) for more information on how the Kibana and Elasticsearch version numbers interact.

Thanks  
Rashmi

---

<div class="post-metadata">

### Author: ![jacktaaniels](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jacktaaniels/32/71596_2.png) [@jacktaaniels](https://discuss.elastic.co/u/jacktaaniels)
#### Post date: [July 8, 2020, 7:50am UTC](https://discuss.elastic.co/t/unable-to-get-kibana-working-under-subdomain/240112/3 "2020-07-08T07:50:35Z")

</div>

Hello,

The versions are ok and kibana logs are also fine. This issue only occurs after installing the SSL certificate from Letsencrypt and using nginx to configure kibana access through a subdomain on a different port. When installing as guided here, erverything works as expected:

> **[How To Install Elasticsearch, Logstash, and Kibana (Elastic Stack) on Ubuntu...](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04)**
>
> In this tutorial, we will go over the installation of the Elastic Stack on an Ubuntu 18.04 server. You will learn how to install all the components of the Elastic Stack (including Filebeat, a Beat used for forwarding and centralizing logs and files)...

  
BR,  
Taaniel.

---

<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 5, 2020, 7:50am UTC](https://discuss.elastic.co/t/unable-to-get-kibana-working-under-subdomain/240112/4 "2020-08-05T07:50:36Z")

</div>

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