Summarymrnginx stands for mongrel_cluster rails nginx. It's a helper script which makes configuring multiple Rails sites with mongrel_cluster and nginx ridiculously easy.
Currently, this script is configured for Ubuntu Server, however with a little tweaking it should work on other distros.
Here's what it does:
creates mongrel_cluster YAML configuration file symlinks this file to /etc/mongrel_cluster creates nginx vhost file overwrites (and backs up) nginx configuration file (/etc/nginx/nginx.conf) restarts mongrel_cluster restarts nginx Before it does anything, it will list what it is about to do and await your confirmation.
Prerequisitesrubygems (to install the following gems) apt-get rubygems (on Ubuntu) mongrel gem install mongrel mongrel_cluster gem install mongrel_cluster nginx apt-get nginx Example usagecd /var/www/apps/myrailsapp
mrnginx -s myrailsapp.com,myrailsapp.netThat's it! (Except DNS configuration of course).
Note: you'll probably need to run it as root (or sudo mrnginx).
mrnginx -h will display this:
Usage: mrnginx [options]
-e, --environment ENV Rails environment to run as
-p, --port PORT Starting port to bind as
[default next unused port after 8000 + 10]
-a, --address ADDR Address to bind to
-c, --chdir PATH Change to dir before starting (will be expanded)
[default current working directory]
-s DOMAIN1,DOMAIN2 Domain(s) for virtual host
--server-names [default localhost]
-N, --num-servers INT Number of Mongrel servers
--user User to run as.
--group Group to run as.
-h, --help Show this message
-v, --version Show versionAuthorZubin Henner
Use Patent Claims
Include Install Instructions
These details are provided for information only. No information here is legal advice and should not be used as such.