Multihoming under OS X

ericmurphy

Registered
My understanding of this stuff is a little hazy, so please bear with me...but it's my understanding that OS X is capable of serving multiple domains from one machine. If I understand what this means, it's that you could serve, say, requests to www.somedomain.com and requests to www.sales.somedomain.com.

I know that you can serve requests in the form of www.somedomain.com/~username/, but is that all that multihoming means under OS X, or can you get more sophisticated, for example, serving up requests to both www.somedomain.com AND www.someotherdomain.com, where the second domain is actually a totally different domain, with different content, and not just a different domain pointed to the same IP address?
 
I thought you were just getting to Apache's Virtual Domain options, but I see maybe you're not.

That'd be kinda neat to see two IP addresses going to two--or even one: you don't need to NICs--ethernet port. I guess I do that with my Airport and built-in ethernet now, but I don't serve up different content in Apache from the different interfaces.

So I don't have anything useful to add, but it's been nice talking to you.

-Rob
 
Well, maybe virtual domains would work. So I could register an additional domain, point it to my IP address, and then apache can figure out how to route requests to the individual domains? That would probably do what I need to do.
 
So the real question is can you configure Apache to have a specific Virtual Domain point to either a particular NIC or a particular IP on that NIC.

If you did some Google-ing you might find an answer on a more Apache-heavy site.

-Rob
 
Set up an alias IP for your nic card(follow the directions that bluehz attached to do that) then configure apache for IP based virtual hosting. Granted, unless you have a compelling reason for having both of these websites on a different IP address, you should stick with name based virtualhosting where both hostnames have the same ip address. Apache then sorts out which site gets served up by the examining the request string from the clients web browser and routing that request to the proper virtualhost.

Either way, your Mac OSX box will do the job nicely.

As a side note... what I just described is called virtual hosting...not multihoming.

Multihoming is when you have two upstream connections to the internet. Example... I have 2 T1's...one to MCI/Worldcomm the other to Sprint. The multihoming ability comes from the routers ability to accept connections on both T1's then figuring out which T1 is the best means of getting from point a to point b for outbound traffic. Generally this is taken care of by various router protocols like OSPF, EIGRP(cisco stuff)... stuff like that.
 
Yeah, that looks like the right way to do it. Ideally, I'd give both domains the same IP address, and then let Apache figure out where to serve the files for each domain from.

Also, thanks for straigtening me out on the distinction between virtual hosting and multihoming. Supposedly multihoming is enabled on my OS X machines, but I wasn't sure what that meant from a practical standpoint.
 
Originally posted by BSDimwit
As a side note... what I just described is called virtual hosting...not multihoming.

Multihoming is when you have two upstream connections to the internet.
I've heard the term "single port multi-homing" and multi-port multi-homing for years, are you saying single port multi-homing does not exist and is simply virtual hosting with an erroneous name?
 
There's more than one way of doing this, but it's not called "multi homing".

1.) Apache virtual servers. Many domains to ONE ip address.

2.) Alias differnet IP addresses onto one or more IP interfaces, and bind apache to different interfaces.

3.) Combine the above methods.

Multi homing is having more than one network interface provide inbound or outbound traffic to a machine. It's used for servers or services that need to be extremely reliable, in case one or more networking interfaces goes down (because the ISP messed up, or the power went out on one route, or whatever).
 
Back
Top