Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have 1 Static IP from my ISP,

I have 3 local physical web servers:

  1. Win2008 IIS 7, local IP, example.com
  2. Ubuntu Apache2, local IP, subdomain1.example.com
  3. Win2003 IIS 6, local IP, subdomain2.example.com

I have 1 domain name, example.com. 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

2 Answers 2

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/mydomain.com, 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.