At 4:47 PM +1200 9/9/07, Michael Koziarski wrote: > > In the case of path based multiple projects on lighttpd + fastcgi. >> That needs additional configuration compared with apache, to modify >> AbstractRequest.relative_url_root. >> >> Someone set it at config/route.rb. >> Someone override AbstractRequest#relative_url_root to refer ENV >> originally referring @env built from CGI#env_table. > >So you'd modify the relative URL root while your application is >running? Or is this only used at startup?
Perhaps the problem you describe is related to a problem I've worked around. In one project I'm serving multiple rails apps from one directory AND referring to them like this: http://host.com/app1 http://host.com/app2 Apache proxies to lighttpd which calls rails through fcgi. In config/environment.rb I have to include the following: RAILS_APPLICATION_PREFIX = 'app1' # uncomment the next line if this application is served from a directory with other rails applications ActionController::AbstractRequest.relative_url_root = '/' + RAILS_APPLICATION_PREFIX Part of my lighttpd config for app1 looks like this: fastcgi.server = ( ".fcgi" => ( ( "bin-path" => basedir + "app1/public/dispatch.fcgi", "bin-environment" => ( "RAILS_ENV" => "production", "RAILS_RELATIVE_URL_ROOT" => "/app1" ) ))) I had thought setting the ENV constant RAILS_RELATIVE_URL_ROOT would serve to set ActionController::AbstractRequest.relative_url_root -- but that didn't work. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
