I’m writing a rails app that will use subdomains ala basecamp and
tadalist,
so that users will be organized into groupname.foo.com. I’m kind of
new to
unix so I’m trying to figure out how to handle subdomains locally with
mongrel. Obvioiusly going to somesubdomain.localhost:3000 doesn’t work.
I’ve hacked the /etc/hosts file to setup a local test url: 127.0.0.1
www.localsite.com. I can use that to run locally and pick up subdomains
but
it feels like there has to be a better way. Any suggestions?
Also, in the etc/hosts file the * wildcard doesn’t seem to catch all
subdomain s (ie. *.localsite.com)
Thanks
On Oct 29, 2006, at 2:11 PM, blinking bear wrote:
all subdomain s (ie. *.localsite.com)
Thanks
I'm sure there must be a better way on OSX but I don't know what it
is. When I need to dev local apps that use subdomains I just setup
some etc/hosts aliases and use those:
127.0.0.1 localhost.com engineyard.localhost.com
ezmobius.localhost.com demo.localhost.com
cheers-
– Ezra Z.
– Lead Rails Evangelist
– [email protected]
– Engine Y., Serious Rails Hosting
– (866) 518-YARD (9273)
I’ve hacked the /etc/hosts file to setup a local test url: 127.0.0.1
www.localsite.com. I can use that to run locally and pick up subdomains
but
it feels like there has to be a better way. Any suggestions?
This might help:
http://www.evolt.org/article/Enabling_Virtual_Hosts_on_MacOS_X/18/13138/index.html
Cheers!
=victor.grey
Agreed that I haven’t found a way to do the * domains either – what
is nice on OSX, however is editing the /etc/hosts file and then
running lookupd -flushcache to flush the dns cache so that it looks up
(and finds your /etc/hosts file) everytime.
We wrote an article on cleanair about subdomain auth and how to test:
http://cleanair.highgroove.com/articles/2006/08/14/simplied-subdomain-authentication-in-ruby-on-rails
let us know if you find anything.
On 10/29/06, Ezra Z. [email protected] wrote:
I can use that to run locally and pick up subdomains but it feels
some etc/hosts aliases and use those:
– (866) 518-YARD (9273)
–
Charles Brian Q.
self-promotion: www.seebq.com
highgroove studios: www.highgroove.com
slingshot hosting: www.slingshothosting.com