Re: Combine http and https backend

2013-07-11 Thread Baptiste
Hi Mark,

I would do:

defaults HTTP
  mode http
  option http-server-close
  option httplog
  timeout client 10s
  timeout server 20s
  timeout connect 4s

frontend ft_myproxyB-http
  bind 212.12.12.12:80
  bind 212.24.24.24:80
  default_backend bk_myproxyB-http

backend bk_myproxyB-http
  balance   roundrobin
  optionhttpchk
  server app07_backup 10.0.0.6:80 check port 80 inter 5000 backup
  server app08_master 10.0.0.7:80 check port 80 inter 5000

defaults TCP
  mode tcp
  option tcplog
  timeout client 60s
  timeout server 60s
  timeout connect 4s

frontend myproxyB-https
  bind 212.12.12.12:443
  bind 212.24.24.24:443
  default_backend bk_myproxyB-https

backend bk_myproxyB-https
  balance   roundrobin
  optionhttpchk
  server app07_backup 10.0.0.6:443 check port 80 inter 5000 backup
  server app08_master 10.0.0.7:443 check port 80 inter 5000



Baptiste



On Wed, Jul 10, 2013 at 10:04 PM, Mark Ruys mark.r...@peercode.nl wrote:
 Hi,

 Just recently I discovered HAProxy and I'm really impressed. I've got a
 cluster setup together with Keepalived. Now I have newby question which
 someone might want to address. Which configuration is preferred:

 listen myproxyA
bind 212.12.12.12:80
bind 212.12.12.12:443
bind 212.24.24.24:80
bind 212.24.24.24:443
optionhttpchk
optiontcplog
mode  tcp
balance   roundrobin
server app01_master 10.0.0.6 check port 80 inter 5000
server app02_backup 10.0.0.7 check port 80 inter 5000 backup

 or:

 listen myproxyB-http
bind 212.12.12.12:80
bind 212.24.24.24:80
balance   roundrobin
mode  http
optionhttpchk
optionhttplog
server app07_backup 10.0.0.6:80 check port 80 inter 5000 backup
server app08_master 10.0.0.7:80 check port 80 inter 5000

 listen myproxyB-https
bind 212.12.12.12:443
bind 212.24.24.24:443
balance   roundrobin
mode  tcp
optionhttpchk
optiontcplog
server app07_backup 10.0.0.6:443 check port 80 inter 5000 backup
server app08_master 10.0.0.7:443 check port 80 inter 5000

 Thank you,

 Mark Ruys





Combine http and https backend

2013-07-10 Thread Mark Ruys
Hi,

Just recently I discovered HAProxy and I'm really impressed. I've got a 
cluster setup together with Keepalived. Now I have newby question which 
someone might want to address. Which configuration is preferred:

listen myproxyA
   bind 212.12.12.12:80
   bind 212.12.12.12:443
   bind 212.24.24.24:80
   bind 212.24.24.24:443
   optionhttpchk
   optiontcplog
   mode  tcp
   balance   roundrobin
   server app01_master 10.0.0.6 check port 80 inter 5000
   server app02_backup 10.0.0.7 check port 80 inter 5000 backup

or:

listen myproxyB-http
   bind 212.12.12.12:80
   bind 212.24.24.24:80
   balance   roundrobin
   mode  http
   optionhttpchk
   optionhttplog
   server app07_backup 10.0.0.6:80 check port 80 inter 5000 backup
   server app08_master 10.0.0.7:80 check port 80 inter 5000

listen myproxyB-https
   bind 212.12.12.12:443
   bind 212.24.24.24:443
   balance   roundrobin
   mode  tcp
   optionhttpchk
   optiontcplog
   server app07_backup 10.0.0.6:443 check port 80 inter 5000 backup
   server app08_master 10.0.0.7:443 check port 80 inter 5000

Thank you,

Mark Ruys