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 have 1 Static IP from my ISP,

I have 3 local physical web servers:

  1. Win2008 IIS 7, local IP,
  2. Ubuntu Apache2, local IP,
  3. Win2003 IIS 6, local IP,

I have 1 domain name, It is configured this way:

Host(A), @,

Host(A), subdomain1,

Host(A), subdomain2,

My router is a pfSense box. It forwards all port 80 traffic to a group alias called "WebServers," which is my 3 web server IP addressees.

This setup should work right? I believe I need to set the "host header names" in my web servers. In IIS I know how to do this. How do I do this in Apache2?

share|improve this question
up vote 0 down vote accepted

You should be fine setting the ServerName to what the name of the domain pointed to the Apache server.

share|improve this answer
ok this worked :) although in Ubuntu, it is slightly "different" from the Apache docs. There was /etc/apache2/apache2.conf, /etc/apache2/sites-available/, and i needed to create a symlink in /etc/apache2/sites-enabled. After that I had to delete the "default" files. WAY more processes than host headers in IIS lol – user59623 Jan 6 '11 at 5:13

Setting the ServerName in the VirtualHost, and setting the NameVirtualHost option, is part of what you want.

It's been a while since I've used pfSense, but I don't recall it having a reverse-proxy module, which is what you need in this case. if pfSense runs Apache with mod_proxy, then you're set, otherwise you may need to add something in between. Note that the reverse proxy layer needs to handle the virtual host names; the backend servers need not have host header names configured.

share|improve this answer

Your Answer


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