Setup Caddy proxy with Kibana 6.x

Hi,

I want to use Caddy in front of my apps including Elasticsearch 6.3 , Kibana 6.3 and so on but no luck with a proper setup. My Caddy version: 0.10.10 and for test purposes, I run Caddy’s executable by providing a config file containing below configuration.

*:80 {
  tls off

  proxy /kibana localhost:5601 {
    without /kibana
  }
  proxy /app/kibana localhost:5601
}

I have a vagrant machine with ip address 192.168.50.50.

I can reach Kibana properly through its port, 192.168.50.50:5601 , but for sure I want to use Caddy not to use ports and enable an endpoint for that, /kibana.

An additional information; 192.168.50.50:5601 redirects to 192.168.50.50:5601/app/kibana, hence the 2nd proxy configuration above.

I looked at documentation and tried few different things but no luck. It is clear I miss something but couldn’t find the way out of it.

Appreciate any help.

I just found the solution, it requires sub-services to be proxied as well. Let me share for those interested.

*:80 {
  tls off

  proxy /kibana localhost:5601 {
    without /kibana
  }
  proxy /app/kibana localhost:5601
  proxy /app/timelion localhost:5601
  proxy /bundles localhost:5601
  proxy /plugins localhost:5601
  proxy /ui localhost:5601
  proxy /api localhost:5601

  proxy /elasticsearch localhost:9200 {
    without elasticsearch
  }
}

Thanks,
Oguzhan

2 Likes

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