# Kibana behind Haproxy: GUI not loading fully

**URL:** <https://discuss.elastic.co/t/kibana-behind-haproxy-gui-not-loading-fully/152350>\
**Category:** Kibana\
**Created:** [October 13, 2018, 5:44pm UTC](https://discuss.elastic.co/t/kibana-behind-haproxy-gui-not-loading-fully/152350 "2018-10-13T17:44:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![agenerette](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@agenerette](https://discuss.elastic.co/u/agenerette)\
**Post date:** [October 13, 2018, 5:44pm UTC](https://discuss.elastic.co/t/kibana-behind-haproxy-gui-not-loading-fully/152350/1 "2018-10-13T17:44:57Z")

</div>

Hello,

Using this repo -- [https://github.com/deviantony/docker-elk](https://github.com/deviantony/docker-elk) -- i recently setup ELK on an EC2 instance running Docker (version 17.05.0-ce, build 89658be) and docker-compose (docker-compose version 1.6.2, build 4d72027). I also used [https://github.com/tugrulcan/docker-elk-filebeat](https://github.com/tugrulcan/docker-elk-filebeat) to install filebeat.

After configuring everything, I'm able to see basic log file entries flowing thru such that I can view them in Kibana: I have to access the GUI, though, via an ssh tunnel into my Docker host.

I would like, though, to be able to access the Kibana GUI via an haproxy container that's also running on my Docker host. That way I'd be able to just hit "http://\<EC2 instance's IP\>/logs" and have this redirect to Kibana, without having to open port 5601 on the host and modify the current security group.

When I try, though, the UI loads partially, then just stops. Clicking on the different options (Discover, Visualize, etc) changes the URL listed ([http://myapp-demo/app/kibana#/home](http://myapp-demo/app/kibana#/home) to [http://myapp-demo/app/kibana#/discover](http://myapp-demo/app/kibana#/discover) to [http://myapp-demo/app/kibana#/visualize](http://myapp-demo/app/kibana#/visualize) and so on), but that's it. Oh, and I have a simple entry in my local /etc/hosts file mapping myapp-demo to the AWS instance's IP.

Security groups are setup, temporarily, on the EC2 instance such that ports 22, 5601, 9200, 9100 are all open to my admin workstation's IP. iptables has only the entries that were put in place by the installation of Docker (iptables wasn't even there on the Docker host, before I installed Docker).

Here's an excerpt from my haproxy.cfg file (I've created a pastebin at [https://pastebin.com/yavnXyEw](https://pastebin.com/yavnXyEw), just in case my posting proves difficult to read):

frontend web  
bind \*:80  
reqadd X-Forwarded-Proto:\ http if !{ ssl\_fc }  
reqadd X-Forwarded-Proto:\ https if { ssl\_fc }

```
default_backend myapp_ui

```

...  
acl is\_kibana path\_sub logs  
acl is\_kibana path\_sub kibana  
acl is\_kibana path\_sub bundles  
acl is\_kibana path\_sub app/kibana  
acl is\_kibana path\_sub plugins/kibana/assets

```
use_backend kibana if is_kibana
use_backend es_head if is_es_head

```

...

backend myapp\_ui  
server ui1 myapp:8080 check

backend kibana  
mode http  
reqrep ^([^\]_\ /)logs[/]?(._) \1\2  
reqrep ^([^\]_\ /)kibana[/]?(._) \1\2  
server kibana kibana:5601 check

And here's an excerpt from my docker-compose.yml file:

haproxy:  
image: \< personal repo \>  
restart: always  
links:  
- myapp  
- kibana  
- es\_head  
volumes:  
- ./docker/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro  
ports:  
- "80:80"

kibana:  
image: \< personal repo \>  
ports:  
- "5601:5601"

Now, since I'm able to get the GUI to load partially, I know that the setup is mostly functional. The issue seems to be, perhaps, with my haproxy acls. I'm not sure what else I need to add in that area.

'Anyone out there have experience with this kind of setup and any ideas on what I can do to get around the issue that I'm seeing?

---

<div class="post-metadata">

**Author:** ![agenerette](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@agenerette](https://discuss.elastic.co/u/agenerette)\
**Post date:** [October 15, 2018, 11:40am UTC](https://discuss.elastic.co/t/kibana-behind-haproxy-gui-not-loading-fully/152350/2 "2018-10-15T11:40:40Z")

</div>

Since I've been using Google Chrome to troubleshoot, I hit F12, to access the Developer Console. Then, attempting to hit "[http://myapp/logs](http://myapp/logs)", I get the debugging information shown in this pastebin:

[https://pastebin.com/3JHgAVe0](https://pastebin.com/3JHgAVe0)

Is there anyone out there who knows Kibana well enough to be able to help me, here? I believe it may amount to just adding the right ACLs.

---

<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:** [November 12, 2018, 11:40am UTC](https://discuss.elastic.co/t/kibana-behind-haproxy-gui-not-loading-fully/152350/3 "2018-11-12T11:40:41Z")

</div>

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