[Mongrel] Mongrel servers running in a subdirectory behind a proxy
jgeiger at gmail.com
Thu Aug 10 14:12:00 EDT 2006
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) >>
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,
external host setting below.
config.action_controller.asset_host = "http://assets.example.com"
Thanks for any help you can supply.
More information about the Mongrel-users