On 10/05/06, Paul Wright <[EMAIL PROTECTED]> wrote:
> All that's left now is working out how to set the environment variable
> RAILS_RELATIVE_URL_ROOT... Any clues?
Just in case anyone else is following along, I found the solution to
be to add the following line to the top of my config/routes.rb above
everything else:
ActionController::AbstractRequest.relative_url_root = "/rails"
And then alter my apache config to look like this:
RewriteEngine On
# Punt any pontential 404s to the proxy
RewriteCond %{REQUEST_FILENAME} ^/rails/.*
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RequestHeader set X_FORWARDED_PROTO 'https'
RewriteRule ^/(.*)$ balancer://proxy_group/$1 [proxy]
Thus the full request_filename is given to mongrel (including the
preceeding /rails/) and it knows what to do with it because of the
additional line in routes.rb.
Cheers for the suggestions,
Paul.
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users