So, Paul, do you have Apache do the asset (CSS,JS,image) serving? I'm
trying your recipe, and the rails app works fine, but I get 404 errors for
the assets.

Here's my setup:

httpd.conf

  <Proxy balancer://cyapm>
    BalancerMember http://127.0.0.1:8100
    BalancerMember http://127.0.0.1:8101
    BalancerMember http://127.0.0.1:8102
    BalancerMember http://127.0.0.1:8103
    BalancerMember http://127.0.0.1:8104
  </Proxy>

  RewriteEngine On
  # Punt any pontential 404s to the proxy
  RewriteCond %{REQUEST_FILENAME} ^/timesheets/.*
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  # for HTTPS
  #RequestHeader set X_FORWARDED_PROTO 'https'
  RewriteRule ^/(.*)$ balancer://cyapm/$1   [proxy]

And in /var/www/rails/cyapm/current/config/environments.rb (appended at the
end):

  ActionController::AbstractRequest.relative_url_root = "/timesheets"

If I connect directly to a mongrel, say http://ciwebdev:8100/, the Rails
app lives at /timesheets, but the assets live in /stylesheets,
/javascripts, /images.  The links Rails generates now expects them to be in
/timesheets/stylesheets, /timesheets/javascripts, /timesheets/images.

Do you have any Rewrite magic for that?

==
Will Green
Web Developer & IT Coordinator, URS Creative Imaging
http://www.urscreativeimaging.com/


                                                                              
 This e-mail and any attachments are confidential. If you receive this        
 message in error or are not the intended recipient, you should not retain,   
 distribute, disclose or use any of this information and you should destroy   
 the e-mail and any attachments or copies.                                    
                                                                              





_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to