[Mongrel] [mongrel_cluster] hosting multiple web sites via apache mod_proxy_balancer

Jeff Jones jeff_jones_101 at yahoo.com
Thu Jul 19 10:13:05 EDT 2007


I'm newbie to mongrel,
I'm not able to config mongrel_cluster in order to host multiple web sites added/remove as apache VirtualHost.

I followed codahale http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/
mixed with Wiki Radiant (I use Radiant as a rails apps to be deployed, 1 domain 1 radiant sites with its own document tree (public,log,config etc.) http://wiki.radiantcms.org/How_To_Host_Multiple_Websites_by_using_mod_proxy

On my machine, I noted only one radiant site is going to be served, the one that corresponds to cwd parameter of the mongrel_cluster.yml config file

user: mongrel
group: mongrel
cwd: /var/radiant/domainA.com
log_file: /tmp/mongrel.log
port: 8000"
environment: production
address: 127.0.0.1
pid_file: /tmp/mongrel.pid
servers: 3
num_procs: 4

I report one of my VirtulHost added in the dir sites-available of the apache config tree, I omit only codahale's rewrite rules. 

<VirtualHost *>

    ServerName domainA.com
    ServerAlias www.domainA.com

    DocumentRoot /var/radiant/domainA.com/public
    
    <Directory "/var/radiant/domainA.com/public">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog /var/radiant/domainA.com/log/error.log
    ErrorDocument 404 /404.html
   
    ProxyPass           / balancer://mongrel_cluster/domainA.com
    ProxyPassReverse    / balancer://mongrel_cluster/domainA.com

    # OMITTED: CODAHALE REWRITE RULES 
</VirtualHost>

I tried to comment cwd parameter, but restarting mongrel_cluster throws me the following error 
!!! Path to docroot not valid: public

Can anyone point me out where I'm wrong ? 

Thanks,
Jeff Jones


       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070719/a6391cab/attachment-0001.html 


More information about the Mongrel-users mailing list