[ANN] Howtos: Deploying Rails on Windows servers


#1

After a lot of work (and much promising) I have written instructions
on various methods to deploy Rails applications in a Windows
environment. For those of you who are not stuck with Windows, this
won’t matter too much to you, but I think this is really useful for
those in Windows shops.

Topics covered:

  • Serving Multiple Rails Applications on Windows with Apache and
    Mongrel

  • Integrate Rails into an Existing IIS Web infrastructure using Apache
    and FastCGI

  • Integrate Rails into an Existing IIS Web infrastructure using Mongrel

  • Integrate Rails into an Existing IIS Web Infrastructure using
    Lighttpd and Mongrel

Visit http://www.napcs.com/howto/rails/deploy/ to download the
articles. Let me know what you think!


#2

On Thu, 2006-05-11 at 08:25 -0500, Brian H. wrote:

  • Integrate Rails into an Existing IIS Web infrastructure using Apache
    and FastCGI

  • Integrate Rails into an Existing IIS Web infrastructure using Mongrel

  • Integrate Rails into an Existing IIS Web Infrastructure using
    Lighttpd and Mongrel

Visit http://www.napcs.com/howto/rails/deploy/ to download the
articles. Let me know what you think!

Nice Brian, I’m starting the documentation pages for Mongrel, and I’ve
listed your site in the other documentation section:

http://mongrel.rubyforge.org/docs/index.html

Let me know if you want to write the “Best Practice Win32 Deployment”
document. It’d basically be a short straight line version of what
you’ve got there, with references to your stuff for more detailed
instructions.


Zed A. Shaw


http://mongrel.rubyforge.org/


#3

Zed:
I’d be happy to.


#4

On 5/11/06, Brian H. removed_email_address@domain.invalid wrote:

those in Windows shops.

This is mildly OT but do you have any recommendations with your
mod_proxy->mongrel setup for handling caching? Because just looking
through
the doc, I don’t see how you’ll be able to accomodate rails’s built in
caching mechanisms. Any information you can provide would be great,

thanks.


#5

I actually mention that… however, according to Zed:

“Mongrel (as of 0.3.7) by default supports Rails style page caching in
the RailsHandler it uses to serve your applications. What this means
is that if you do a page cached action (which writes a .html file as
well as respond) then Mongrel will just serve up the cached page
instead of bug Rails.”

Now, I know Lighttpd and Apache can serve static stuff up much faster,
but at least it’s not like Rails gets invoked on every request.

I am investigateing several solutions for this right now and will
probably publish my findings at the same web site. It’s definitely an
issue that concerns me.


#6

On May 11, 2006, at 1:50 PM, Tanner B. wrote:

This is mildly OT but do you have any recommendations with your
mod_proxy->mongrel setup for handling caching? Because just
looking through the doc, I don’t see how you’ll be able to
accomodate rails’s built in caching mechanisms. Any information
you can provide would be great,

Here’s some Apache config stuff from a previous post to the Rails
list. It handles static content via Apache and proxies the rest
to Mongrel.

Serve static request with Apache

RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -f

Serve server-info and server-status with Apache

RewriteRule . - [last]
RewriteCond %{REQUEST_URI} ^/(server-info|server-status)

Everything else goes to Mongrel

RewriteRule . - [last]
RewriteRule ^/(.*)$ balancer://proxy_group/$1 [proxy]

This defines where the mongrels are

<Proxy balancer://proxy_group>
BalancerMember http://127.0.0.1:7000
BalancerMember http://127.0.0.1:7001

This handles the reverse proxying

ProxyPassReverse / balancer://proxy_group/

If anyone wants to write this up, go for it. Just give me an
attribution, please. :slight_smile:


– Tom M.


#7

The commenting was a bit off, sorry for that. This fixes that.

Again, if anyone wants to write this up, go for it. Just give me
an attribution, please. :slight_smile:

RewriteRule . - [last]

This handles the reverse proxying

ProxyPassReverse / balancer://proxy_group/


– Tom M.