Joey Geiger
2006-Aug-10 18:12 UTC
[Mongrel] Mongrel servers running in a subdirectory behind a proxy
I was able to find some information about this in the list archives, but it ended with a possible patch being submitted for Mongrel. I tried to follow a few of the instructions, but I''m still kind of stuck, since I''m not sure if what I''m seeing is the proper results. I have an application running on a cluster of mongrel servers, which is behind pen, which in turn is behind an apache 1.3 mod_proxy. apache >> proxypass /app http://127.0.0.1:8000 >> pen(8000) >> mongrel_cluster (8001-3) I''m using mongrel_cluster, so I added "prefix: /app" into the cluster configuration, but I''m not sure if it''s doing anything, as the routes generated by rails are still /user/index and not /app/user/index As part of the information in previous posts, I found this possible solution, but I wasn''t sure if I need to do both at the same time. #make rails think it lives in /app ActionController::AbstractRequest.relative_url_root = "/app" Also the above setting has a bad side effect that if makes the images, stylesheets, javascripts think they are in /app, even when using the external host setting below. # Enable serving of images, stylesheets, and javascripts from an asset server config.action_controller.asset_host = "http://assets.example.com" Thanks for any help you can supply.
Zed Shaw
2006-Aug-10 19:06 UTC
[Mongrel] Mongrel servers running in a subdirectory behind a proxy
On Thu, 2006-08-10 at 13:12 -0500, Joey Geiger wrote:> I was able to find some information about this in the list archives, > but it ended with a possible patch being submitted for Mongrel. >You need the pre-release 0.3.13.4 of mongrel which supports the --prefix option: sudo gem install mongrel --source=http://mongrel.rubyforge.org/releases/ With this you can then configure your mongrel servers with the --prefix option: mongrel_rails start -e production --prefix=/app I''ll have to contact Bradley about how to get mongrel_cluster to use this though. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support?
Bradley Taylor
2006-Aug-11 00:33 UTC
[Mongrel] Mongrel servers running in a subdirectory behind a proxy
On Aug 10, 2006, at 3:06 PM, Zed Shaw wrote:> > With this you can then configure your mongrel servers with the -- > prefix > option: > > mongrel_rails start -e production --prefix=/app > > I''ll have to contact Bradley about how to get mongrel_cluster to use > this though.A mongrel_cluster release is coming soon (like tomorrow). It has the ''prefix'' patch and other nice contributions. Unless, of course, Rails 1.1.7 comes out. -Bradley ------ Rails Optimized Hosting ~ VPS and Dedicated Servers Simplified Deployment ~ Services and Software http://railsmachine.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060810/7870df5f/attachment-0001.html