Sean Brown
2007-Jun-22 14:14 UTC
[Mongrel] Mongrel_cluster and rails app in a subdirectory
Info:
Apache 2.2
mongrel 1.0.1
mongrel_cluster 0.2.1
I''ve had everything working with a bunch of applications like this
when the the rails app is the document root, but a client just asked
to move the app to a subdirectory, leaving he rest of their site
alone. However, I can''t seem to get it to work. Let''s make
the
assumption that the Apache document root for the site is in
/www/htdocs, and the Rails root is /www/ror_root. Further lets say
the client wants the application to be found at
http://mysite.com/railsapp.
This is what I have in the mongrel_cluster.yml
---
user: mongrel
cwd: /www/ror_root
port: "8008"
environment: production
group: mongrel
address: 127.0.0.1
pid_file: log/mongrel.pid
servers: 2
prefix: /railsapp
Here''s what I have in the apache config:
<VirtualHost *:80>
ServerAdmin me at mysite.com
DocumentRoot /www/htdocs
ServerName mysite.com
<Directory "/www/htdocs">
Options Indexes FollowSymLinks
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
<Directory "/www/ror_root/public">
Options FollowSymLinks
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
RewriteLog /www/logs/rewrite.log
ProxyPass /railsapp/ balancer://railsapp
ProxyPass /railsapp balancer://railsapp
ProxyPassReverse /railsapp/ balancer://railsapp
ProxyPreserveHost On
<Proxy balancer://railsapp>
BalancerMember http://127.0.0.1:8008
BalancerMember http://127.0.0.1:8009
</Proxy>
</VirtualHost>
Anyone see anything wrong?
--
Sean
