[Instantrails-users] Staring application with Mongrel withoutshutting down IIS

Curt Hibbs curt.hibbs at gmail.com
Thu Jan 11 17:05:55 EST 2007


On 1/11/07, Leonid Raiz <Leonid at raizlabs.com> wrote:
>
>  Just avoiding automatic start of Apache did not help. I experimented some
> more and narrowed the problem a bit. It is possible that the question is
> better directed at general RoR audience but I state it here just in case.
>
> My windows hosts file contains
> 127.0.0.1     myapp
>
> while InstantRails\conf_file\httpd.conf contains
> <VirtualHost *>
>     ServerName myapp
>     ProxyPass / http://localhost:3004/
>     ProxyPassReverse / http://localhost:3004
> </VirtualHost>
> I am observing that when I shut down IIS, start Apache via IR and from IR
> start myapp with Mongrel then browsing to http://myapp works as expected.
> However if Apache is not started then I can't browse to myapp even though
> Apache should not be used.
>
> On further investigation I now suspect that the problem is related to
> processing of httpd.conf (or its copy consumed by Apache). It appears that
> when Apache is not running even though I can not browse to http://myapp, I
> *can* browse to http://myapp:3004 . What is up with that? Is it a general
> RoR issue and is there a way for me to address it so I am relieved of the
> necessity to shut down IIS or type port number?
>

I think you're working with an incorrect mental model of how things are
working.

Mongrel is a web server (written in Ruby) that has been configured to serve
up "myapp" on port 3004. Once you started up myapp via Mongrel, you can
browse to it using http://myapp:3004 or even http://127.0.0.1:3004

In fact, when you are developing a Rails app, this is generally what you do
(leaving out Apache entirely). Even in production, if you only needed to
serve up a single Rails-based web site, you could just configure Mongrel to
serve the Rails app on port 80.

Apache comes in to play when you want to test in a production-like
environment where you have multiple web apps running via Mongrel (each on
separate port) and then you use Apache handle requests on port 80 and proxy
those requests over to the various instances of Mongrel depending on the
URL.

Curt

Fortunately I have to type port number just once. Subsequent browsing within
> myapp automatically keeps the same port number.
>
>  -----Original Message-----
> *From:* instantrails-users-bounces at rubyforge.org [mailto:
> instantrails-users-bounces at rubyforge.org] *On Behalf Of *Curt Hibbs
> *Sent:* Monday, January 08, 2007 11:04 PM
> *To:* instantrails-users at rubyforge.org
> *Subject:* Re: [Instantrails-users] Staring application with Mongrel
> withoutshutting down IIS
>
> On 1/8/07, Leonid Raiz <Leonid at raizlabs.com> wrote:
> >
> >  I installed IR 1.4 on Win XP and am learning RoR. Starting IR starts
> > Apache which correctly detects that port 80 already being used by IIS.
> > Things are working OK if I shut down IIS prior to staring IR. Since I run my
> > application with Mongrel (not Apache) and use port 3004 then I assume that I
> > should be able to avoid the annoying necessity to shut down IIS. My
> > simpleminded attempt to leave IIS running failed. When I try to connect to
> > my development site Windows prompts me to login to my development computer
> > using Guest account and would not accept any password.  I fail to see how
> > this behavior could possibly be connected with IIS left running. If IIS is
> > stopped first then no login dialog ever appears and the app is working with
> > Mongrel just fine.
> >
> > Can someone explain why this is happening and suggest how to avoid it?
> >
>
> Select Configure > Instant Rails from the main menu and uncheck the option
> to automatically start Apache. That will avoid your problem with IIS, and
> you're not using Apache anyway.
>
> Curt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20070111/f323cd95/attachment.html 


More information about the Instantrails-users mailing list