Setting up confluence with HAProxy

I would like to setup Confluence with HAProxy, but am unsure how to start.  Has anyone done this or have any examples to follow?  I currently have 1 server running confluence.

1 answer

Has anyone managed to get this working? I have a basic configuration working, but it appears to have broken WebSudo...



    log local2

    chroot      /var/lib/haproxy

    pidfile     /var/run/

    maxconn     10000

    user        root

    group       root


    tune.ssl.default-dh-param 2048

    stats socket /var/lib/haproxy/stats


    mode                    http

    log                     global

    option                  httplog

    option                  dontlognull

    option http-server-close

    option forwardfor       except

    option                  redispatch

    retries                 3

    timeout http-request    10s

    timeout queue           1m

    timeout connect         10s

    timeout client          1m

    timeout server          1m

    timeout http-keep-alive 10s

    timeout check           10s

    maxconn                 10000


    stats enable

    stats uri /proxy-stats

    stats realm HAproxy\ Statistics

    stats auth user:pass

frontend  confluence_web_insecure

    bind *:80

    redirect scheme https if !{ ssl_fc }


frontend confluence_web_secure

    mode http

    bind *:443 ssl crt /foo.pem

    reqadd X-Forwarded-Proto:\ https

    reqadd X-Forwarded-Port:\ 443

    default_backend confluence_app


backend confluence_app

    option httplog

    option forwardfor

    option http-server-close

    option httpchk

    mode        http

    balance     roundrobin

    cookie      JSESSIONID prefix indirect nocache

    server node01 ssl verify none cookie s1

    server node02 ssl verify none cookie s2


take a look at this confluence knowledgebase article: 

If you remove the parameter "indirect" in cookies options the problem should be solved. For me it worked fine :-) 

Best regards 


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

669 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you