Forum: Ruby on Rails mongrel cluster w/ apache

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B0c31b2dad1edd570adff34f672e6314?d=identicon&s=25 mike (Guest)
on 2007-06-03 20:23
(Received via mailing list)
hi all,

i'm working on deploying my app w/ apache and a mongrel cluster. i've
started by copying the instructions and code from the agile rails book
and everything seems to be working fine but apache isn't forwarding my
requests to mongrel the way i expect it should. there's nothing in the
rewrite logs and nothing but 404 errors in the apache error logs.

...loads up my app in mongrel so all is fine there. i'm thinking
apache should have no problem when i browse to:

i get 404 errors...

is there some special incantation necessary to make this work?

the relevant parts of my apache config follow:

<Proxy balancer://mongrel_cluster>
<VirtualHost *:555>
 DocumentRoot /usr/local/www/weposs/current/public
 <Directory "/usr/local/www/weposs/current/public" >
   Options FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
 RewriteEngine On
 RewriteLog logs/weposs_rewrite_log
 RewriteLogLevel 9
 # Check for  maintenance file and redirect all requests
 RewriteCond  %{DOCUMENT_ROOT}/system/maintenance.html -f
 RewriteCond  %{SCRIPT_FILENAME} !maintenance.html
 RewriteRule  ^.*$ /system/maintenance.html [L]
 # Rewrite index to check for static
 RewriteRule ^/$ /index.html [QSA]
 # Rewrite to check for Rails cached page
 RewriteRule ^([^.]+)$ $1.html [QSA]
 # Redirect all non-static requests to cluster
 RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI}

if anyone can help me sort this i'd appreciate it so much. i worked so
hard to get this far (and learned a lot) but i'm stuck pretty bad at
this point.


-mike bannister
Ab0b702e7fcc79bb7d2c6c67f64e1b4d?d=identicon&s=25 tmac (Guest)
on 2007-06-03 21:55
(Received via mailing list)
Hey Mike,

Not real sure to be honest but I'd try dropping a:


in that vhost section.  Unless it's the first vhost configured I don't
think it will find it without that.

good luck
4a79f6a97e31b1d13b239e7f52187674?d=identicon&s=25 Joon You (joonee)
on 2007-06-03 22:43
(Received via mailing list)
1.  You need to add:

        ProxyPass / balancer://mongrel_cluster/
        ProxyPassReverse / balancer://mongrel_cluster/

2.  Make sure your proxy is allowed from Apache configuration file.
You should have:

        ProxyRequests On

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all

Notice there's "Allow from all" - that's turning it on.  However,
since you're getting 404 error and not 500.  That appears to be okay,
but check it anyway.

Hope this helps.

Ff804a315bea90445dcb3876e206cbe2?d=identicon&s=25 Nathan Fiedler (Guest)
on 2007-06-04 01:42
(Received via mailing list)
As Tim said, you probably need the ServerAlias directive. You didn't
show it, so I wonder if you have the "NameVirtualHost *:555" specified
anywhere. I believe you may need that in your case. I did for my setup,
which is very similar to yours. In fact, everything else about your
configuration is identical to my own, and it's working for me (although
I use port 80 and I just use "", without ServerAlias).

This topic is locked and can not be replied to.