[Mongrel] mongrel cluster w/ apache

Patrick Berry pberry at gmail.com
Sun Jun 3 16:39:41 EDT 2007


With the vhost thing cleared up, I would start with the "simple" apache
config in the mongrel docs:
http://mongrel.rubyforge.org/docs/apache.html

Work up from there to the advanced.  It should give you a much better
understanding of what bits of the config are doing what.

Pat

On 6/3/07, Michael Bannister <mikebannister at gmail.com> wrote:
>
> cool, this seemed to help a lot. my requests are getting rewritten and
> if i don't type a controller name it loads the rails intro page.
> problem now is when i do specify a controller and action i my request
> is forbidden. the error log message looks like this:
>
> [Sun Jun 03 15:57:59 2007] [error] [client 70.198.82.115] client
> denied by server configuration:
> proxy:balancer://mongrel_cluster/controllername/actionname
>
> thanks so much for getting me this far...can you recommend what i need
> to do to get over this hump?
>
> thanks patrick
>
> peace,
> mike
>
> On 6/3/07, Patrick Berry <pberry at gmail.com> wrote:
> > Okay, your vhost config (specifically the *:555 part) depends on it
> being
> > set.  Definitely check out:
> > http://httpd.apache.org/docs/2.2/vhosts/name-based.html
> >
> >
> >
> >
> > On 6/3/07, Michael Bannister <mikebannister at gmail.com> wrote:
> > > No, I don't have any in there. The apache conf is pretty much the
> > > default other than what I pasted.
> > >
> > > On 6/3/07, Patrick Berry <pberry at gmail.com> wrote:
> > > > Are named virtual hosts enabled in the main httpd.conf?
> > > >
> > > >
> > > > On 6/3/07, Michael Bannister <mikebannister at gmail.com > wrote:
> > > > >
> > > > > 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.
> > > > >
> > > > > http://127.0.0.1:8000/railsaction/railsmethod
> > > > >
> > > > > ...loads up my app in mongrel so all is fine there. i'm thinking
> > > > > apache should have no problem when i browse to:
> > > > >
> > > > >
> > > >
> > http://elsewhere.thealarmlights.net:555/railsaction/railsmethod
> > > > >
> > > > > 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>
> > > > >   BalancerMember http://127.0.0.1:8000
> > > > >   BalancerMember http://127.0.0.1:8001
> > > > > </Proxy>
> > > > > <VirtualHost *:555>
> > > > >   ServerName thealarmlights.net
> > > > >   DocumentRoot /usr/local/www/weposs/current/public
> > > > >   <Directory "/usr/local/www/weposs/current/public" >
> > > > >     Options FollowSymLinks
> > > > >     AllowOverride None
> > > > >     Order allow,deny
> > > > >     Allow from all
> > > > >   </Directory>
> > > > >   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
> > > > >   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}
> > !-f
> > > > >   RewriteRule ^/(.*)$
> > > > balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
> > > > > </VirtualHost>
> > > > >
> > > > > 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.
> > > > >
> > > > > thanks.
> > > > >
> > > > > -mike bannister
> > > > > _______________________________________________
> > > > > Mongrel-users mailing list
> > > > > Mongrel-users at rubyforge.org
> > > > > http://rubyforge.org/mailman/listinfo/mongrel-users
> > > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Mongrel-users mailing list
> > > > Mongrel-users at rubyforge.org
> > > > http://rubyforge.org/mailman/listinfo/mongrel-users
> > > >
> > > _______________________________________________
> > > Mongrel-users mailing list
> > > Mongrel-users at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/mongrel-users
> > >
> >
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070603/073241c5/attachment.html 


More information about the Mongrel-users mailing list