title: HAproxy-reverse proxy for multiple domains - 503 service unavailable
body: <p>I have try to setup a HAproxy - reverse proxy for multiple domains.But when i tried the HAProxy url in browser, it shows "503 - service unavailable".</p>
  
  <p>Am trying to setup this,I have four domains- when any one hits the proxy server url ,the request has to go the particular domain belongs to the request.</p>
  
  <p>Below my haproxy config file.</p>
  
  <pre><code>log         127.0.0.1 local2
  chroot      /var/lib/haproxy
  pidfile     /var/run/haproxy.pid
  maxconn     4000
  user        haproxy
  group       haproxy
  daemon
  
  # turn on stats unix socket
  stats socket /var/lib/haproxy/stats
  </code></pre>
  
  <hr>
  
  <p>defaults</p>
  
  <pre><code>mode                    http
  log                     global
  option                  httplog
  option                  dontlognull
  option                  http-server-close
  option                  forwardfor
  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                 3000
  </code></pre>
  
  <hr>
  
  <p>frontend   http-in
  bind *:80</p>
  
  <pre><code>    acl host1 hdr(host) -i xyz.com
      acl host2 hdr(host) -i abc.com
      acl host3 hdr(host) -i ghy.com
      acl host4 hdr(host) -i klm.com
  
      use_backend xyz if host1
      use_backend abc if host2
      use_backend ghy if host3
      use_backend klm if host4
  </code></pre>
  
  <hr>
  
  <p>backend xyz</p>
  
  <pre><code>    mode    http
      balance     roundrobin
      option forwardfor
      server s2 xyz.com:80 check
  </code></pre>
  
  <p>backend abc</p>
  
  <pre><code>    mode    http
      balance     roundrobin
      option forwardfor
      server s1 abc.com:80 check
  </code></pre>
  
  <p>backend ghy</p>
  
  <pre><code>    mode    http
      balance     roundrobin
      option forwardfor
      server s4 ghy.com:80 check
  </code></pre>
  
  <p>backend klm</p>
  
  <pre><code>    mode    http
      balance     roundrobin
      option forwardfor
      server s3 klm.com:443 check
  </code></pre>
  
  <p>listen webinterface</p>
  
  <p>bind 0.0.0.0:9200</p>
  
  <p>mode http</p>
  
  <p>stats enable</p>
  
  <p>stats uri /</p>
  
  <p>stats realm Strictly\ Private</p>
  
  <p>stats auth admin:admin@123</p>
  
  <hr>
  
  <p>Please help me to fix this issue.</p>
  
  <p>Thanks in Advance.</p>