Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>EDIT:</strong> At least until there's a Phusion Passenger for Win, Apache + Mongrel is the way to go. You can use Apache + FastCGI without Mongrel, but under real loads you will get (more) zombie processes and (more) memory leaks.</p> <p>You could also look at proxying to <a href="http://code.macournoyer.com/thin/" rel="noreferrer">Thin</a> in the same way as detailed below. However, I've had some instabilities with Thin on Win, even though it's appreciably quicker. AB (Apache Benchmark) is your friend here!</p> <p>Configuring Apache + Mongrel on Windows is not significantly different from *nix.</p> <p>Essentially, you need to proxy requests coming into Apache to Mongrel. What this boils down to is something like this:</p> <pre><code>LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so &lt;VirtualHost localhost:80&gt; ServerName www.myapp.comm DocumentRoot "C:/web/myapp/public" ProxyPass / http://www.myapp.com:3000/ ProxyPassReverse / http://www.myapp.com:3000/ ProxyPreserveHost On &lt;/VirtualHost&gt; </code></pre> <p>Stick this in your <code>httpd.conf</code> (or <code>httpd-vhost.conf</code> if you're including it).</p> <p>It assumes you're going to run mongrel on port 3000, your Rails root is in <code>C:\web\myapp</code>, and you'll access the app at www.myapp.com.</p> <p>To run the rails app in production mode:</p> <pre><code>mongrel_rails start -p 3000 -e production </code></pre> <p>And away you go (actually mongrel defaults to port 3000 so you could skip <code>-p 3000</code> if you want).</p> <p>The main difference is that you cannot daemonize mongrel on Windows (i.e. make it run in the background). Instead you can install it as a service using the <code>mongrel_service</code> gem.</p> <p>Also, running a cluster is more complicated and you won't be able to use Capistrano. Let me know if you want more info.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload