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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Oct 29, 2006, at 2:11 PM, blinking bear wrote:> 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 >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 Zygmuntowicz -- Lead Rails Evangelist -- ez-NLltGlunAUd/unjJdyJNww@public.gmane.org -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
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 Zygmuntowicz <ezmobius-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Oct 29, 2006, at 2:11 PM, blinking bear wrote: > > > 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 > > > > 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 Zygmuntowicz > -- Lead Rails Evangelist > -- ez-NLltGlunAUd/unjJdyJNww@public.gmane.org > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > > > >-- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---