Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'd like to forward incoming traffic on 80 to various ports based on the hostname.

previously on serverfault i've seen solutions that uses ldirectord, just iptables, haproxy, and other proxy servers.

considering that i'm looking for simply proxying, what would be the pro's and con's of ldirectord vs haproxy vs perhaps some pure iptables based solution?


share|improve this question
up vote 2 down vote accepted

LVS is a layer 4 focused product, it doesn't peek up into layer 7 sections of the packet to decode http headers, so it cannot make decisions based on them. Similarly for iptables you'd have to find some http module and have it be a tcp proxy and... lets just say it'd be an obscure hack if you got it working.

So in that case your x vs. y decision is more or less made for you, ha-proxy. Also comparably lightweight to ha-proxy would be "pound".

share|improve this answer

As you mentioned port 80, I'm assuming all you want to proxy is HTTP?

Look into apache mod_proxy

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.