Hi,

I've been attempting, unsuccessfully, to configure haproxy to reverse proxy
HTTP requests (/maps context) to the HTTPS Google maps API.  Network traces
show empty data packets coming back from Google which appear to be
interpreted as 503/bad gateway by haproxy.  I've modified the haproxy
config through various attempts to get this working (commented out lines)
but still no success.  I've compared successful reverse proxy requests
processed by Apache and the request headers are identical (cookie order is
different).  My config below:

defaults

    mode                    http

    log                     global

    option                  httplog

    option    tcplog

#    option                  dontlognull

    option http-server-close

#    option forwardfor       except 127.0.0.0/8

#    option forwardfor

    option                  redispatch

    retries                 3

    timeout http-request    10s

    timeout queue           100s

    timeout connect         8s

    timeout client          1m

    timeout server          1m

    timeout http-keep-alive 10s

    timeout check           10s

    maxconn                 3000

#no option checkcache
frontend main
    bind *:80
#    bind *:443 ssl crt /etc/ssl/certs/lb-1.pem
    mode http
#    option forwardfor
#    option http-server-close
#    option http-pretend-keepalive
     capture request header Location len 64

    acl url_maps         path_beg   -i    /maps

#redirect prefix https://maps.googleapis.com if { path_beg -i /maps }
#redirect prefix https://www.domain.com/login if { path_beg -i /login }

#    redirect scheme https if url_maps !{ ssl_fc }
#redirect location https://maps.googleapis.com if url_maps


    use_backend maps               if url_maps

backend maps
  #reqirep Destination:\ http(.*) Destination:\ https\\1
#  acl is-ssl  dst_port 443
#  reqadd X-Scheme:\ https  if is-ssl
#  option forwardfor
option http-keep-alive
  server      google_maps maps.googleapis.com:443

Reply via email to