Forum: Ruby on Rails Re: Setting up Subdomains as Account Keys Under Mac OS X

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sean M. (Guest)
on 2005-12-30 19:40
(Received via mailing list)

> Make sure you still put the port number in the url, like
> sub.domain.mine:3000

I was doing that. I finally figured out my problem, the directions in
"Dynamic VHosts Working" [1] were incorrect for Mac OS X (and probably
other Unix platforms).  In /etc/hosts you cannot add multiple entries
with the same key, like so:     localhost     sub.domain.mine     foo.domain.mine

You must add the aliases on a single line:     localhost sub.domain.mine foo.domain.mine

I also learned quite a bit about Mac OS X's lookupd.  If you type
lookupd -configuration examine the host configuration item:

LookupOrder: Cache FF NI DNS DS
_config_name: Host Configuration

You'll want to ensure that FF appears before DNS so that the entries
in your flat file (FF), /etc/hosts, are used before hitting the DNS

I'm going to update the Rails Wiki with this information.


This topic is locked and can not be replied to.