Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up confluence with HAProxy

Andrew Meyer February 5, 2016

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

0 votes
CBA STACC
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 30, 2016

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

 

global

    log         127.0.0.1 local2

    chroot      /var/lib/haproxy

    pidfile     /var/run/haproxy.pid

    maxconn     10000

    user        root

    group       root

    daemon

    tune.ssl.default-dh-param 2048

    stats socket /var/lib/haproxy/stats


defaults

    mode                    http

    log                     global

    option                  httplog

    option                  dontlognull

    option http-server-close

    option forwardfor       except 127.0.0.0/8

    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 foo1.bar.baz ssl verify none cookie s1

    server node02 foo2.bar ssl verify none cookie s2



Deleted user November 13, 2017

Hi, 

take a look at this confluence knowledgebase article: 

https://confluence.atlassian.com/confkb/websudo-login-issues-with-haproxy-829068354.html 

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

Best regards 

Alex

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events