Virtual Hosting

srciaran

Registered
I have a Mac OS X 10.3.x server. I want to do virtual web hosting from a single internal IP address on a NAT network. I have two web sites configured, each with its own web folder. The server is behind a Netgear FVS318 router with a single static IP address. The problem is that no matter what HTTP request I make, it defaults to the first site in the "Sites" list. If I rearrange them, the top site in the list becomes the default that the browser always goes to. It is my understanding that Apache will read the HTTP Host header request and will direct the traffic to the specified folder. Instead, I see the following error in the error log: "Could not determine the server's fully qualified domain name, using 127.0.0.1." I don't know for sure that this is related, but it appears that it might be.

So narrowing it down, it would appear that Apache is either (a) not reading the header or (b) there is no header for it to read, which would point to something wrong with my router's port forwarding of HTTP traffic. Any ideas?
 
Use ServerAdmin, go to Web make sure its enabled, next configure it to where lets say you had a website called WebGamers.com and one called TextMessage.com, then you'd put in www.webgamers.com and www.textmessage.com and then link those to it. I wish I could use ServerAdmin, but running through a proxy won't let me. So basically, you need to set it all up in ServerAdmin - doesn't matter what's in the sites folder, you like where the site is via ServerAdmin.
 
You know, sometimes you think you've covered everything... You just gave me the one subtle thing that I was missing -- the "www." as part of the site name. I had them set to just domain.com. Added the www and it fixed it. Thanks!!!
 
Back
Top