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

I have 1 Static IP from my ISP, 58.59.60.61

I have 3 local physical web servers:

  1. Win2008 IIS 7, local IP 192.168.10.11, mydomain.com
  2. Ubuntu Apache2, local IP 192.168.10.12, subdomain1.mydomain.com
  3. Win2003 IIS 6, local IP 192.168.10.13, subdomain2.mydomain.com

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

Host(A), @, 58.59.60.61

Host(A), subdomain1, 58.59.60.61

Host(A), subdomain2, 58.59.60.61

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's.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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