[Mongrel] Help w/ Apache Proxying Mongrel

Nathan Mealey nathan.mealey at simmons.edu
Fri Dec 15 13:33:20 EST 2006


I'm running Apache 2.0 as a proxy to several Mongrel/Rails apps, so that all
of my Mongrel apps can be routed through the single Apache IP address.
Apache 2.0 is already in use on the system, which is why I haven't decided
to use Apache 2.2.

 

The problem I'm having is that this setup only works for Rails apps that do
not use the public/index.html file as the main page. For any apps that do
use public/index.html as the main page, none of the links off of index.html
work. So no stylesheet info, no images, and no links to other parts of the
application. Even though I've installed the reverse_proxy_fix plugin. 

The tutorial from here
(http://www.napcsweb.com/howto/rails/deployment/RailsWithApacheAndMong...
<http://www.napcsweb.com/howto/rails/deployment/RailsWithApacheAndMongrel.pd
f> ) didn't cover this type of error, and I've been stuck fiddling with it
for a while. 

Has anyone else had this problem and resolved it? 

Any help is much appreciated. My httpd-proxy.conf file is included below: 

LoadModule proxy_module modules/mod_proxy.so 
LoadModule proxy_http_module modules/mod_proxy_http.so 
ProxyRequests Off 

<Proxy *> 
  Order deny,allow 
  Allow from all 
</Proxy> 

#Proxy information for project application 
Alias /project "e:/rails_apps/project/public" 
<Directory "e:/rails_apps/project/public"> 
  Options Indexes FollowSymLinks 
  AllowOverride none 
  Order allow,deny 
  Allow from all 
</Directory> 

ProxyPass /project/images ! 
ProxyPass /project/stylesheets ! 
ProxyPass /project/javascripts ! 

ProxyPass /project/ http://127.0.0.1:4000/ 

ProxyPass /project http://127.0.0.1:4000/ 
ProxyPassReverse /project/ http://127.0.0.1:4000/ 

#Proxy information for research guides application 
#this is the application not working properly 
Alias /research "e:/rails_apps/research/public" 
<Directory "e:/rails_apps/research/public"> 
  Options Indexes FollowSymLinks 
  AllowOverride none 
  Order allow,deny 
  Allow from all 
</Directory> 

ProxyPass /research/images ! 
ProxyPass /research/stylesheets ! 
ProxyPass /research/javascripts ! 

ProxyPass /research/ http://127.0.0.1:4002/ 

ProxyPass /research http://127.0.0.1:4002/ 
ProxyPassReverse /research/ http://127.0.0.1:4002/ 

Thanks!
--

Nathan Mealey

Systems Librarian

Simmons College

617.521.2755

nathan.mealey at simmons.edu

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061215/5c363d9d/attachment.html 


More information about the Mongrel-users mailing list