Hello,
I’m new to HAProxy. I’m trying to set up HA to handle mixed content site (http 
and https). My site runs on http except login box which needs https.
When I apply the configure with mode tcp, everything is fine. But I cannot 
modify header, which I need to identify user’s real IP.
So I want to use mode http and when I do that, the content of login box does 
not appear ( all css, static files cannot be loaded)
Could you please tell me if anyway to fix this problem or HAProxy does not 
support this yet?

This is my HAProxy config, below:

##
# HAPROXY 1.5.12
##

global
    daemon
    user haproxy
    group haproxy
    chroot /home/haproxy
    maxconn 10000
    stats socket /tmp/haproxy
    pidfile /var/run/haproxy.pid
    log 127.0.0.1   local1
          tune.ssl.default-dh-param 2048

defaults
    #mode http
    retries 3
    option redispatch
    timeout connect 50000ms
    timeout client 50000ms
    timeout server 50000ms
    errorfile 400 /prefix/haproxy/errors/400.http
    errorfile 403 /prefix/haproxy/errors/403.http
    errorfile 408 /dev/null
    errorfile 500 /prefix/haproxy/errors/500.http
    errorfile 502 /prefix/haproxy/errors/502.http
    errorfile 503 /prefix/haproxy/errors/503.http
    errorfile 504 /prefix/haproxy/errors/504.http


#### FRONTEND

frontend fe_https
  bind *:443 ssl crt /prefix/haproxy/ca/domain01.pem
  mode http
  option httpclose
  option forwardfor

  acl ssl_host01.vn hdr(host) -i host01.vn www.host01.vn
  use_backend be_host01_https if ssl_host01.vn

frontend fe_http
  bind *:80
  log global
  mode http
  option httplog
  option forwardfor

  acl host01.vn hdr(host) -i host01.vn www.host01.vn
  use_backend be_game5_http if host01.vn

#### BACKEND

backend be_host01_https
  mode http
  option httplog
  option forwardfor
  log global
  balance roundrobin

  server SSL_HOST_1 10.0.0.1:80 check
  server SSL_HOST_2 10.0.0.2:80 check

backend be_host01_http
  mode http
  log global
  balance roundrobin

  server HOST_9 10.0.0.1:80 check
  server HOST_10 10.0.0.2:80 check

## END

Thanks in advanced,

Tu Nguyen,
  


Reply via email to