Setting up Subdomains as Account Keys Under Mac OS X


#1

I’m trying to configure my Rails app to use the subdomain as the
account key. I’ve followed along with the HowTo [1], but under Mac OS
X (10.4.3) I cannot get sub.domain.mine to map to 127.0.0.1.

I’ve modified /etc/hosts as explained in “Dynamic Vhosts Working” [2],
but I do not want to use Apache … I’m using Webrick for development.
Since this is Mac OS X, I also tried NetInfo Manager
(/Applications/Utilities/NetInfo Manager.app) by duplicating machines
localhost and changing the name property to “sub.domain.mine” – but
that still didn’t work. I also tried rebooting after maching the
/etc/hosts and NetInfo changes, but that didn’t make it start to work.

Is there something I’m missing to alias sub.domain.mine to 127.0.0.1?
I wouldn’t think it would have anything to do with the webserver
(Webrick) as the browser should be using the OS to resolve the domain
name to an IP address.

Many thanks in advance for assistance,
Sean

[1]
http://wiki.rubyonrails.com/rails/pages/HowToUseSubdomainsAsAccountKeys
[2] http://www.mpet45.co.uk/articles/2005/02/02


#2

On Dec 30, 2005, at 6:13 AM, Sean M. wrote:

I’m trying to configure my Rails app to use the subdomain as the
account key. I’ve followed along with the HowTo [1], but under Mac OS
X (10.4.3) I cannot get sub.domain.mine to map to 127.0.0.1.

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

toby