title: How do I separate traffic by domain?
body: <h1>Background</h1>
  
  <p>I currently have multiple low power servers running on my LAN. They all run different services, but some of them are similar. I also own 3 domains and have many sub-domains for those domains.</p>
  
  <h2>So, what's your problem?</h2>
  
  <p>Well, as I said before, some of my service are REALLY similar, and run on the same port (I have an Owncloud server on one, and my website is hosted on another). This means that if I want <em>owncloud.mydomain.com</em> to go to my Owncloud server, and <em>www.mydoamain.com</em> to go to my web server, I have a little bit of an issue. Both sub-domains just go to my house and the services use the same port. I can't really separate the traffic per subdomain.</p>
  
  <p>edit: It also needs to be able to direct many types of traffic like SSH, HTTPS, and FTP</p>
  
  <h2>Possible Solutions</h2>
  
  <p>I've though about just running the different service on different ports, but would not be optimal AT ALL. It means it's weird to look at, people will have a harder time using any of my services, and it will generally be something I do not like. </p>
  
  <p>I've thought about similar services on the same server, but their are some pretty dinky servers. I'd rather not have to do anything like that at all. Also, since the servers are a little old, it's nice to know that if one of them dies, at least I'll have my other services. I don't think this option is good at all. </p>
  
  <p><strong>Best possible solution:</strong> I've heard that there's a service that has the exact functionality that I'm looking for called <strong>haproxy</strong>. My only issues with this is that I don't know how to use this service and I especially don't know How to get the use I want out of it.</p>
  
  <h1>My final question</h1>
  
  <p>I would love to get haproxy working, I just need to know how to set it up the way I need. If anyone has a link to a tutorial on how to do what I want specifically (I've already found out how to get haproxy working, just not the way I want) then I would be really grateful. I would look for this myself, but I already have, and I don't even know what to search for. Can anyone help me out?</p>
  
  <p>Thank you</p>