title: HAProxy config for sub-domains
body: <p>I need an example HAProxy config to do the following:</p>
  
  <p>Server1 = 192.168.0.177 ( I did not give the servers names - only IP's)</p>
  
  <p>On Server1, I run HAproxy as well as Apache.</p>
  
  <p>Apache on Server1 is setup to listen on port 8080 now, and has two Virtual Hosts correctly setup for two sub-domains - each serving its own website content.
  Sub-domain 1 = s.mydomain.com
  Sub-domain 2 = x.mydomain.com</p>
  
  <p>I have a second server running on 192.168.0.233.</p>
  
  <p>I want to setup HAProxy to listen to s.mydomain.com and then forward it to Apache on the same server ( 192.168.0.177), x.mydomain.com and forward it to Apache on the same server (192.168.0.177) and y.mydomain.com and forward traffic to the second server (192.168.0.233).</p>
  
  <p>I do not need any load balancing at this point, just routing/forwarding as described above.</p>