2 Replies Latest reply: Feb 21, 2017 12:39 PM by Rodolfo Marrero RSS

    Running QlikSense behind haproxy

    Jurgen Schaub



      We're working on a proof of concept using Qlik, and (for a bunch of reasons) we'd like to be able to run it behind our haproxy machine. It's less about load balancing and more about IP addresses and routing.


      I understand there's a lot of websockets use, and I found some documentation on how to get that working with haproxy. Where I could use a little guidance is around the multitude of URLs that a Qlik installation needs, and how to configure Qlik to understand that it's running behind a proxy and should create all its URLs with '/reports/' at the beginning.


      Has anyone done something like this before, and be willing to share their configuration or some pointers?


      Many thanks!

        • Re: Running QlikSense behind haproxy
          Marco Stapel



          at the moment we trying the same thing.
          QlikView WebServer behind Linux HAProxy ...


          Does it work now at your site ?

          • Re: Running QlikSense behind haproxy
            Rodolfo Marrero

            Here is my config: no SSL (using port 80), with IIS (hence using port 8080)


                log local0 notice

                maxconn 2048

                tune.ssl.default-dh-param 2048

                user haproxy

                group haproxy




                log     global

                mode    http

                option  httplog

                option  dontlognull

                option  http-server-close

                option  forwardfor

                option  redispatch

                retries 3

                timeout connect  5s

                timeout client  300s

                timeout server  300s

                timeout tunnel  3600s

                timeout http-keep-alive 1s

                timeout http-request 60s

                timeout queue 60s

                timeout tarpit 120s



            frontend http-in

                bind *:80


                #Define hosts

                acl host_qlik hdr(host) -i qlik.mydomain.com

                use_backend qlik01 if host_qlik


                acl host_qlik_connection_upgrade hdr(Connection) -i upgrade

                use_backend qlik01 if host_qlik_connection_upgrade


                acl host_qlik_upgrade_websocket  hdr(Upgrade)     -i websocket

                use_backend qlik01 if host_qlik_upgrade_websocket


            frontend windows-auth-in-4248

                bind *:4248

                option http-tunnel

                default_backend qlikauth


            backend qlik01

                mode http

                balance leastconn

                #option forwardfor

                option http-server-close

                option forceclose

                no option httpclose

                #http-request set-header X-Forwarded-Port %[dst_port]

                #http-request add-header X-Forwarded-Proto https if { ssl_fc }

                option httpchk HEAD / HTTP/1.1\r\nHost:haproxy01

                server web01 THE_IP:8080 check inter 60s



            backend qlikauth

                #mode http

                balance leastconn

                option forwardfor

                http-request set-header X-Forwarded-Port %[dst_port]

                http-request add-header X-Forwarded-Proto https if { ssl_fc }

                #option httpchk HEAD / HTTP/1.1\r\nHost:haproxy01

                server web01 THE_IP:4248


            Good luck.