title: Reverse proxy with haproxy not forwarding host
body: <p>I am trying to configure HAproxy running on one server to forward requests to some apps I have running on appfog but it has stopped working. I have checked my configurations but I can't spot the problem. </p>
  
  <p>I suspect the host information is not being forwarded correctly because when I enter the domain1.com I am routed to domain1.app.com on appfog but the server throws a 404.</p>
  
  <p>This is my configuration file -</p>
  
  <pre><code>global
          maxconn   4096
          user      haproxy
          group     haproxy
          daemon
          log       127.0.0.1 local0  info
          log       127.0.0.1 local1  notice
  
  defaults
          log     global
          mode    http
          option  httplog
          option  dontlognull
          option  originalto
          option  forwardfor
      stats   enable
      stats   auth domain1:xxxxxx
          option  httpclose
          retries 3
          option  redispatch
          maxconn        2000
          contimeout      5000
          clitimeout      50000
          srvtimeout      50000
  
  backend domain1_at_appfog
          reqirep ^Host:\ domain2.com Host:\ domain2.web.app.com
          server appfog1 domain2.web.app.com:80
  
  backend domain2_at_appfog
          reqirep ^Host:\ domain1.com Host:\ domain1.app.com
          server appfog2 domain1.app.com:80 
  
  backend local_host_site
          server this1 127.0.0.1:8080
  
  frontend superliciousLove *:80
          acl www_domain1 hdr_dom(host)  -i www.domain1.com
      acl local_host url_sub www2
      use_backend domain1_at_appfog if www_domain1
          use_backend local_host_site if local_host
          default_backend   domain1_at_appfog
  </code></pre>