Advertisement
Guest User

Untitled

a guest
Oct 13th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. frontend web
  2. bind *:80
  3. reqadd X-Forwarded-Proto:\ http if !{ ssl_fc }
  4. reqadd X-Forwarded-Proto:\ https if { ssl_fc }
  5.  
  6. default_backend myapp_ui
  7. ...
  8. acl is_kibana path_sub logs
  9. acl is_kibana path_sub kibana
  10. acl is_kibana path_sub bundles
  11. acl is_kibana path_sub app/kibana
  12. acl is_kibana path_sub plugins/kibana/assets
  13.  
  14. use_backend kibana if is_kibana
  15. use_backend es_head if is_es_head
  16. ...
  17.  
  18. backend myapp_ui
  19. server ui1 myapp:8080 check
  20.  
  21. backend kibana
  22. mode http
  23. reqrep ^([^\ ]*\ /)logs[/]?(.*) \1\2
  24. reqrep ^([^\ ]*\ /)kibana[/]?(.*) \1\2
  25. server kibana kibana:5601 check
  26.  
  27. And here's an excerpt from my docker-compose.yml file:
  28.  
  29. haproxy:
  30. image: < personal repo >
  31. restart: always
  32. links:
  33. - myapp
  34. - kibana
  35. - es_head
  36. volumes:
  37. - ./docker/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
  38. ports:
  39. - "80:80"
  40.  
  41. kibana:
  42. image: < personal repo >
  43. ports:
  44. - "5601:5601"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement