I am trying to proxy requests from nginx to kibana (logstash). I can access the kibana dashboard on port 9292 - I can confirm that a service is listening on port 9292. I can successfully proxy from nginx to other services but the proxy directive for kibana (port 9292) does not work - I can proxy to 9200 for elasticsearch. Any ideas on how to troubleshoot this further would be appreciated.
Update: I have tried changing the server setup in upstream to point to 0.0.0.0 as well as the server address but neither option works. The request gets routed to the default server.
Another Update: I have noticed that removing the proxy parameters from the nginx default file allows me to forward the request to the kibana listneing port - however, kibana complains about missing "dashboards/default.json" which I am guessing is due to some missing or misconfigured setup in nginx.
default (/etc/nginx/sites-available)
upstream logstash {
server 127.0.0.1:9292; ##kibana
keepalive 100;
}
server {
listen 84;
listen [::]:84 ipv6only=on;
root /var/www/;
index index.html index.htm;
server_name logstash;
##logging per server
access_log /var/log/nginx/logstash/access.log;
error_log /var/log/nginx/logstash/error.log;
location / {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://logstash;
}
}