Unable to get Kibana working under subdomain


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. 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:

    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
      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.

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 to see how you can change this to log to a file. Pleas see this version compatibility chart for more information on how the Kibana and Elasticsearch version numbers interact.



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:


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