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