Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Apache virtual host setup' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Apache virtual host setup
Authored by: Anonymous on Apr 04, '01 08:36:00PM

I'm doing virtual hosting on MacOS X by specifying domain names rather than
portmapping. (I forget what this is called.) It works with all but the most
ancient browsers, and is easier and cleaner because you can have n sites
all hosted from port 80, which makes router configuration easier too. (I'm
also doing this from inside a LinkSys firewall/router.) My ISP doesn't
block port 80 (man, you need a new isp!) so I don't have to play around
with ports like you have to.

Here's what my /etc/httpd/httpd.conf file looks like in the relevant
section. Say is the server's address on the network inside the

DocumentRoot "/Library/Webserver/Documents/mydomain"

DocumentRoot "/Library/Webserver/Documents/myotherdomain"

DNS for these domains is being served by (Zoneedit
kicks butt, at least as far as I can tell after two weeks.)

I can't really see how different the above is from your setup. One thing to
remember is that Linksys routers don't do forwarding on packets coming from
inside the firewall. So you might actually have everything configured right
and working for everyone in the world except you. That's what I found.

Since I'm inside the firewall, requests for my domains return "my" (really
my router's at this point) static IP address, just like they do for
everyone else. The problem is sending http requests to the router from
*inside* pulls up the linksys config page instead of having the packets
forwarded to the MacOS X machine on the local network. (SSH out to some
other host and lynx your way back in to see if things look ok from the

I can fix this under OS 8.6 by editing the MacOS Hosts file like this: A A

...but I can't get this to work under OS X! Like others, I've seen that
/etc/hosts tells you to use NetInfo, and I've been trying to use NetInfo
following the suggestions posted in this thread. So far, no luck.

The fact that NetInfo has zero documentation is really annoying. (There's
some old NeXT stuff at Apple, such as

but this hardly counts.)

-Rob Calhoun

[ Reply to This | # ]
Questions about this Hint: Apache virtual host setup.
Authored by: spoon on Aug 25, '02 04:30:30AM

"DNS for these domains is being served by"

How do you have zoneedit set up?
Pointing to the router's IP, I guess? How does the router point it to the machine, or must the machine have a "real" IP, not an intranet IP?

Could you please explain this point a bit further? I'm trying to configure a Mac OS X 10.2 (not server) machine, with a web server (hosting many domains, with one IP) and also share the DSL modem with the rest of the office (seems like Jaguar has this new feature built in).

Is this even possible with only one Ethernet card and a 2MB DSL modem with a static IP?

I'm not doing the DNS. I use a zoneedit-like service that points DNS to my server's IP -- all the domains to the same IP. I'm planning to host 4 or 5 domains (small sites) on the same machine.


[ Reply to This | # ]