[Mongrel] my apache 2.2 conf

Charles Brian Quinn me at seebq.com
Tue Jan 2 18:27:58 EST 2007


if your mongrel configuration files have the line:

address: 127.0.0.1

you will only be able to access them from the local machine, i.e.
127.0.0.1 or localhost --

so http://localhost:3000/

NOT:  http://servername.com:3000/

Also, if you're wanting to use a prefix (a directory after the domain,
like http://mydomain.com/ror/ then, you need the mongrel prefix line:

prefix: ror

Check the syntax on the above, but should be right.

On 1/2/07, Jim Douglas <jdz99 at hotmail.com> wrote:
> >From: "Michael D'Auria" <michael.dauria at gmail.com>
> >Reply-To: mongrel-users at rubyforge.org
> >To: mongrel-users at rubyforge.org
> >Subject: Re: [Mongrel] my apache 2.2 conf
> >Date: Tue, 2 Jan 2007 13:41:39 -0500
> >
> >Mongrel is probably set up to listen on port 3000 for localhost only.
> >Shouldn't you be connecting via port 80 instead and let Apache talk to
> >Mongrel?  http://www.myserver.com
> >
> >On 1/2/07, Jim Douglas <jdz99 at hotmail.com> wrote:
> >>
> >> >From: Steven Lumos <steven at lumos.us>
> >> >Reply-To: mongrel-users at rubyforge.org
> >> >To: mongrel-users at rubyforge.org
> >> >Subject: [Mongrel] my apache 2.2 conf
> >> >Date: Thu, 21 Dec 2006 11:20:38 -0800
> >> >
> >> >
> >> >I just finished updating our internal site, which hosts multiple Rails
> >> >apps, to Apache 2.2.3.  It also has a TWiki rewritten into the root,
> >> >ViewVC mounted on /cvs, and /server-status and /server-info.
> >> >
> >> ><VirtualHost *:80>
> >> >   ServerName int.example.com
> >> >   ServerAlias int
> >> >
> >> >   CustomLog /var/www/logs/int.example.com/access.log combined
> >> >   ErrorLog  /var/www/logs/int.example.com/error.log
> >> >
> >> >   [...]
> >> >
> >> >   ## Application Server
> >> >
> >> >   # APP1
> >> >   <Proxy balancer://app1>
> >> >     BalancerMember http://127.0.0.1:11001
> >> >   </Proxy>
> >> >
> >> >   Alias /app1 /production/app1/public
> >> >   <Directory /production/app1/public>
> >> >     Allow from .example.com
> >> >     RewriteEngine on
> >> >     RewriteRule ^/?$ balancer://app1%{REQUEST_URI} [P,L]
> >> >     RewriteCond %{REQUEST_FILENAME} !-f
> >> >     RewriteRule . balancer://app1%{REQUEST_URI} [P,L]
> >> >   </Directory>
> >> >   # End APP1
> >> >
> >> >   # APP2
> >> >   <Proxy balancer://app2>
> >> >     BalancerMember http://127.0.0.1:11010
> >> >   </Proxy>
> >> >
> >> >   Alias /app2 /dev/app2/public
> >> >   <Directory /dev/app2/public>
> >> >     Allow from .example.com
> >> >     RewriteEngine on
> >> >     RewriteRule ^/?$ balancer://app2%{REQUEST_URI} [P,L]
> >> >     RewriteCond %{REQUEST_FILENAME} !-f
> >> >     RewriteRule . balancer://app2%{REQUEST_URI} [P,L]
> >> >   </Directory>
> >> >   # End APP2
> >> ></VirtualHost>
> >> >
> >> >Then I give mongrel_rails --prefix app<n> and done.  Almost too easy.
> >> >And it's going to be almost trivial to add more mongrels whenever we
> >> >need them and I set up mongrel_cluster.  Thanks again Zed and whoever
> >> >is responsible for mod_proxy(_balance).
> >> >
> >> >Steve
> >> >
> >> >_______________________________________________
> >> >Mongrel-users mailing list
> >> >Mongrel-users at rubyforge.org
> >> >http://rubyforge.org/mailman/listinfo/mongrel-users
> >>
> >>
> >>I tried this config and can get it working from the server like so,
> >>
> >>http://www.myserver.com:3000/
> >>
> >>...but when I try to access this address from a client machine elsewhere I
> >>get a "unable to connect error"
> >>
> >>any ideas?
> >>
> >>Jim
> >>
> >>_________________________________________________________________
> >>Find sales, coupons, and free shipping, all in one place! MSN Shopping
> >>Sales & Deals
> >>http://shopping.msn.com/content/shp/?ctid=198,ptnrid=176,ptnrdata=200639
> >>
> >>
> >>
> >>_______________________________________________
> >>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
>
>
> I have a websirte and want to demo a RoR appin a sub directory.  Apache in
> front of Mongrel, that's why I want http://www.myserver.com:/ror, but I keep
> getting this error,
>
> Status: 500 Internal Server Error Content-Type: text/html
> Application error (Rails)
>
> So I am getting to it via,
> http://www.myserver.com/3000
>
> Jim
>
> _________________________________________________________________
> Type your favorite song. Get a customized station. Try MSN Radio powered
> by Pandora. http://radio.msn.com/?icid=T002MSN03A07001
>
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
>


-- 
Charles Brian Quinn
self-promotion: www.seebq.com
highgroove studios: www.highgroove.com
slingshot hosting: www.slingshothosting.com

Ruby on Rails Bootcamp at the Big Nerd Ranch
Intensive Ruby on Rails Training:
http://www.bignerdranch.com/classes/ruby.shtml


More information about the Mongrel-users mailing list