Thanks Jim. Slowly but surely I'm figuring it out :) I manually updated the Hostname.domain fields via the console and now Radiant seems to be recognizing them! For some reason it doesn't like any domain starting w/ www e.g. "www.domain.com". Instead I had to use "domain.com" to match www.domain.com.
Also - when I try to add a new homepage to the brand-new site by clicking the "+ New Homepage" button at the bottom of the Pages tab, Radiant throws an error: Processing Admin::PagesController#new (for 127.0.0.1 at 2011-02-08 22:26:26) [GET] Parameters: {"action"=>"new", "controller"=>"admin/pages"} ActiveRecord::UnknownAttributeError (unknown attribute: site_id): vendor/radiant/app/controllers/admin/resource_controller.rb:144:in `new' Any ideas? I'd be more than happy to write up a guide on how to install + configure this vhost extension once I get it all working :P Thanks again for your help! On Tue, Feb 8, 2011 at 10:01 PM, Jim Gay <j...@saturnflyer.com> wrote: > > On Feb 9, 2011, at 0:33 , Fima Leshinsky wrote: > >> That seems very odd. How does Radiant know which site you're >> requesting? In your examples, the browser wouldn't send an HTTP Host >> header which is really the only way to differentiate between site A >> and site B at the HTTP level. Also localhost is just an entry in your >> /etc/hosts file (assuming you're on a un*x-based system), which by >> default is configured to resolve to 127.0.0.1. Since Radiant only sees >> HTTP - both of those requests would appear identical to it. >> >> In my case - Radiant is serving up the default site regardless of what >> Host header it sees. >> >> Do I need to make a change somewhere else to add new sites using the >> vhost extension? >> >> Interesting that the Site model doesn't contain a hostname field. >> Where is the hostname of each site specified? >> >> Site.find_each {|s| p s} >> #<Site id: 1, config: {"title"=>"Default"}> >> #<Site id: 2, config: {"title"=>"Effective Web Presence"}> > > Dig into the models. > > A site has_many :hostnames > https://github.com/saturnflyer/radiant-vhost-extension/blob/master/app/models/site.rb > > Setup your sites with differing hostnames and then open different browser > windows and request them. > This works just fine for me. > > >> >> Thanks again! >> >>> It depends on what you've setup. >>> >>> I'll often (in development) set one site to be "localhost" and another to >>> "0.0.0.0" and another to "127.0.0.1" >>> All of those point back to your internal webserver and Radiant can answer >>> for 3 different sites. >>> >>> Does that help? >>> >>> -Jim > >