<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Design Rails - Home</title>
  <id>tag:www.designrails.com,2008:mephisto/</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  <link href="http://www.designrails.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.designrails.com/" rel="alternate" type="text/html"/>
  <updated>2008-06-24T06:26:12Z</updated>
  <entry xml:base="http://www.designrails.com/">
    <author>
      <name>Michael</name>
    </author>
    <id>tag:www.designrails.com,2008-06-23:9</id>
    <published>2008-06-23T13:31:00Z</published>
    <updated>2008-06-24T06:26:12Z</updated>
    <category term="Mac OSX"/>
    <category term="files"/>
    <category term="hidden"/>
    <category term="mac"/>
    <category term="osx"/>
    <link href="http://www.designrails.com/2008/6/23/hidden-files-on-mac-osx" rel="alternate" type="text/html"/>
    <title>Hidden files on Mac OSX</title>
<summary type="html">&lt;p&gt;When I first started delving into the world of web development I was stumped with the  seemingly simplest of things - finding hidden files on my &lt;a href=&quot;http://en.wikipedia.org/wiki/PowerBook_G4&quot;&gt;PowerBook&lt;/a&gt; (yes, I know it's old) running OSX Tiger. This hit me hard when, for example, I had to find a configuration file or directory in the deepest darkest region of my system. However, like anyone with at least one eighth of a brain, I consulted my friend Mr Google. &lt;/p&gt;

&lt;p&gt;&lt;img title=&quot;Terminal&quot; src=&quot;http://www.designrails.com/assets/2008/6/23/FinderScreenSnapz001.jpg&quot; alt=&quot;Terminal app&quot; /&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;When I first started delving into the world of web development I was stumped with the  seemingly simplest of things - finding hidden files on my &lt;a href=&quot;http://en.wikipedia.org/wiki/PowerBook_G4&quot;&gt;PowerBook&lt;/a&gt; (yes, I know it's old) running OSX Tiger. This hit me hard when, for example, I had to find a configuration file or directory in the deepest darkest region of my system. However, like anyone with at least one eighth of a brain, I consulted my friend Mr Google. &lt;/p&gt;

&lt;p&gt;&lt;img title=&quot;Terminal&quot; src=&quot;http://www.designrails.com/assets/2008/6/23/FinderScreenSnapz001.jpg&quot; alt=&quot;Terminal app&quot; /&gt;&lt;/p&gt;
&lt;p&gt;When I first started delving into the world of web development I was stumped with the  seemingly simplest of things - finding hidden files on my &lt;a href=&quot;http://en.wikipedia.org/wiki/PowerBook_G4&quot;&gt;PowerBook&lt;/a&gt; (yes, I know it's old) running OSX Tiger. This hit me hard when, for example, I had to find a configuration file or directory in the deepest darkest region of my system. However, like anyone with at least one eighth of a brain, I consulted my friend Mr Google. &lt;/p&gt;

&lt;p&gt;Answers? yes, I uncovered two approaches to uncovering and viewing your hidden files. Though today I only use one approach and that is the first that I am about to show you. &lt;/p&gt;

&lt;p&gt;But before we look at the 'how', let's define the 'what'. What are invisible or hidden files and directories? Simply, they start with a full stop, or for those in America – a period. Here is an example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: all lines starting with '#' are commented out. Don't type this line.&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;
# Hidden file
.hidden

# Non-hidden file
hidden
&lt;/pre&gt;

&lt;h3&gt;Approach One: The command line&lt;/h3&gt;

&lt;p&gt;OK, If you are not familiar with the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apple_Terminal&quot;&gt;Terminal application on OSX&lt;/a&gt;, please don't be afraid. You won't break anything (I hope!). Open your Terminal application. This is usually located in the &lt;strong&gt;Applications/Utilities&lt;/strong&gt; directory on your Mac.&lt;/p&gt;

&lt;p&gt;&lt;img title=&quot;Terminal&quot; src=&quot;http://www.designrails.com/assets/2008/6/23/FinderScreenSnapz001.jpg&quot; alt=&quot;Terminal app&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So go ahead and open a new window in Terminal (or new shell!). Now let's enter the following commands:&lt;/p&gt;

&lt;pre&gt;
# List the files and folders in current directory
# Lower case L and S
ls
&lt;/pre&gt;

&lt;p&gt;&lt;img title=&quot;Terminal&quot; src=&quot;http://www.designrails.com/assets/2008/6/23/terminal-one.jpg&quot; alt=&quot;Terminal app&quot; /&gt;&lt;/p&gt;

&lt;pre&gt;
## Now list all files and directories
ls -la
&lt;/pre&gt;

&lt;p&gt;&lt;img title=&quot;Terminal&quot; src=&quot;http://www.designrails.com/assets/2008/6/23/terminal-two.jpg&quot; alt=&quot;Terminal app&quot; /&gt;&lt;/p&gt;

&lt;p&gt;See the difference?&lt;/p&gt;

&lt;h3&gt;Approach Two: Get someone else to do the dirty work&lt;/h3&gt;

&lt;p&gt;If you don't want to get your hands dirty with the command line in Terminal there is an alternative. It's call &lt;a href=&quot;http://www.santasw.com/&quot;&gt;MainMenu&lt;/a&gt;. Go ahead, download the application to your desktop and install.&lt;/p&gt;

&lt;p&gt;&lt;img title=&quot;MainMenu&quot; src=&quot;http://www.designrails.com/assets/2008/6/23/main-menu-site.jpg&quot; alt=&quot;MainMenu&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once you install MainMenu, just go to &lt;strong&gt;finder &gt; show invisibles.&lt;/strong&gt; That's it!&lt;/p&gt;

&lt;p&gt;&lt;img title=&quot;MainMenu&quot; src=&quot;http://www.designrails.com/assets/2008/6/23/main-menu.jpg&quot; alt=&quot;MainMenu&quot; /&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.designrails.com/">
    <author>
      <name>Michael</name>
    </author>
    <id>tag:www.designrails.com,2008-06-20:5</id>
    <published>2008-06-20T04:31:00Z</published>
    <updated>2008-06-23T01:56:10Z</updated>
    <category term="Graphic design"/>
    <category term="design"/>
    <category term="helvetica"/>
    <link href="http://www.designrails.com/2008/6/20/helvetica-the-film" rel="alternate" type="text/html"/>
    <title>Helvetica the film</title>
<summary type="html">&lt;p&gt;&lt;strong&gt;I am a big fan of &lt;a href=&quot;http://en.wikipedia.org/wiki/Helvetica&quot;&gt;Helvetica&lt;/a&gt;.&lt;/strong&gt; You will find that previous statement is evident in &lt;a href=&quot;http://www.engineactive.com/Work&quot;&gt;my graphic design work&lt;/a&gt;. I feel joy when working with a well thought out grid coupled with an appropriately set &lt;a href=&quot;http://en.wikipedia.org/wiki/Baseline_%28typography%29&quot;&gt;baseline&lt;/a&gt;, and if that grid and baseline has a friend called Helvetica, then that is a golden moment. &lt;/p&gt;</summary><content type="html">
            &lt;p&gt;&lt;strong&gt;I am a big fan of &lt;a href=&quot;http://en.wikipedia.org/wiki/Helvetica&quot;&gt;Helvetica&lt;/a&gt;.&lt;/strong&gt; You will find that previous statement is evident in &lt;a href=&quot;http://www.engineactive.com/Work&quot;&gt;my graphic design work&lt;/a&gt;. I feel joy when working with a well thought out grid coupled with an appropriately set &lt;a href=&quot;http://en.wikipedia.org/wiki/Baseline_%28typography%29&quot;&gt;baseline&lt;/a&gt;, and if that grid and baseline has a friend called Helvetica, then that is a golden moment. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I am a big fan of &lt;a href=&quot;http://en.wikipedia.org/wiki/Helvetica&quot;&gt;Helvetica&lt;/a&gt;.&lt;/strong&gt; You will find that previous statement is evident in &lt;a href=&quot;http://www.engineactive.com/Work&quot;&gt;my graphic design work&lt;/a&gt;. I feel joy when working with a well thought out grid with an appropriately set &lt;a href=&quot;http://en.wikipedia.org/wiki/Baseline_%28typography%29&quot;&gt;baseline&lt;/a&gt;, and if that grid and baseline has a friend called Helvetica, then that is a golden moment. &lt;/p&gt;

&lt;p&gt;I first realized the power of locking type to a baseline while working with my friend &lt;a href=&quot;http://markgowing.com/&quot;&gt;Mark Gowing&lt;/a&gt; quite a few years back. (I have not seen Mark for a few years. So, hi Mark if your reading this, we'll talk soon). There is something so aesthetically pleasing about Helvetica, that even until this day, it is a quality I cannot find in any other &lt;a href=&quot;http://en.wikipedia.org/wiki/Typeface&quot;&gt;typeface&lt;/a&gt;. Helvetica has the ability to polarize a room. The room is often divided into two absolute camps. Those who despise Helvetica and those, like myself, who adore Helvetica and hold it in near holy status. &lt;/p&gt;

&lt;p&gt;Why the love for Helvetica? Because after working with Helvetica for a number of years, there will be a very good chance you will grow fond of the simple practical nature of the typeface. Helvetica has the ability to fade into the background, if say, the focus of the design is not the type, but perhaps on an image or graphic element instead, or it has the awesome ability to be the very focus of the design, to become the image on the page.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.helveticafilm.com/index.html&quot;&gt;&lt;strong&gt;Helvetica&lt;/strong&gt; – A documentary film by Gary Hustwit&lt;/a&gt;, is a must see. Even for non–designers, the documentary offers great insight and offers understanding and opinion from some of the worlds most influential Graphic Designers and Typographers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Below is just one of the trailers for the Helvetica film. The trailer features &lt;a href=&quot;http://en.wikipedia.org/wiki/Wim_Crouwel&quot;&gt;Wim Crouwel&lt;/a&gt; the Dutch Graphic Designer and Typographer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;344&quot; width=&quot;425&quot;&gt;&amp;lt;param&gt;&amp;lt;/param&gt;&amp;lt;embed src=&quot;http://www.youtube.com/v/iOzDUAh5b90&amp;amp;amp;hl=en&quot; height=&quot;344&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.designrails.com/">
    <author>
      <name>Michael</name>
    </author>
    <id>tag:www.designrails.com,2008-06-20:4</id>
    <published>2008-06-20T00:19:00Z</published>
    <updated>2008-07-02T02:20:01Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Ubuntu"/>
    <category term="mongrel"/>
    <category term="nginx"/>
    <category term="ubuntu"/>
    <link href="http://www.designrails.com/2008/6/20/part-2-setting-up-nginx-with-a-mongrel-cluster" rel="alternate" type="text/html"/>
    <title>Part 2: Setting up Nginx with a Mongrel cluster</title>
<summary type="html">&lt;p&gt;In part one of &lt;a href=&quot;http://www.designrails.com/2008/6/20/setting-up-nginx-with-a-mongrel-cluster&quot;&gt;setting up Nginx with a Mongrel cluster&lt;/a&gt; we set up the appropriate Nginx directories and configured our &lt;strong&gt;nginx.conf&lt;/strong&gt; file.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;In part one of &lt;a href=&quot;http://www.designrails.com/2008/6/20/setting-up-nginx-with-a-mongrel-cluster&quot;&gt;setting up Nginx with a Mongrel cluster&lt;/a&gt; we set up the appropriate Nginx directories and configured our &lt;strong&gt;nginx.conf&lt;/strong&gt; file.&lt;/p&gt;
&lt;p&gt;In part one of &lt;a href=&quot;http://www.designrails.com/2008/6/20/setting-up-nginx-with-a-mongrel-cluster&quot;&gt;setting up Nginx with a Mongrel cluster&lt;/a&gt; we set up the appropriate Nginx directories and configured our &lt;strong&gt;nginx.conf&lt;/strong&gt; file.&lt;/p&gt;

&lt;p&gt;Now that we have created our directories and we have our nginx.conf file sorted, let's get Nginx fired up using the configuration file we made.&lt;/p&gt;

&lt;pre&gt;
nginx -c /home/username/nginx/nginx.conf
&lt;/pre&gt;

&lt;p&gt;In most cases that command should fire up Nginx with the correct configuration for your Mongrels. If not and for reference, I have included some very handy commands to help you start, stop and kill Nginx.&lt;/p&gt;

&lt;pre&gt;
## To kill Nginx
killall -u $USER -v -i nginx

## To start Nginx back up
nginx -c /home/username/nginx/nginx.conf

## Find the master Nginx process
ps -aef | egrep '(PID|nginx)'

## To kill the identified process
kill -15 'process-id'
&lt;/pre&gt;

&lt;h3&gt;Getting &lt;a href=&quot;http://mongrel.rubyforge.org/&quot;&gt;Mongrel&lt;/a&gt; cluster installed and configured&lt;/h3&gt;

&lt;p&gt;Assuming you have Rubygems already installed, we will go ahead and get &lt;strong&gt;Mongrel&lt;/strong&gt; and &lt;strong&gt;Mongrel cluster&lt;/strong&gt; via the 'gem' command. We will also drop the documentation when installing so we can save some system resources.&lt;/p&gt;

&lt;pre&gt;
gem install mongrel mongrel_cluster --no-rdoc --no-ri
&lt;/pre&gt;

&lt;p&gt;Now we need to create a &lt;strong&gt;mongrel_cluster.yml&lt;/strong&gt; file that will live in our rails application. This file needs to go in the following directory:&lt;/p&gt;

&lt;pre&gt;
myRailsApp/config/mongrel_cluster.yml
&lt;/pre&gt;

&lt;p&gt;Your &lt;strong&gt;mongrel_cluster.yml&lt;/strong&gt; will look similar to what I use. I say similar because what I use is a very simple 'bare bones' configuration. This works great for me, but you may find you need to alter the configuration to suit your requirements. &lt;strong&gt;Please note that 'myRailsApp' == 'mywebsite.com', it's the same directory.&lt;/strong&gt; You can give them the same name, I do. But in this article I have used more descriptive naming.&lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;---&lt;tt&gt;
&lt;/tt&gt;port: '8000'&lt;tt&gt;
&lt;/tt&gt;cwd: /home/username/myRailsApp&lt;tt&gt;
&lt;/tt&gt;log_file: log/mongrel.log&lt;tt&gt;
&lt;/tt&gt;environment: production&lt;tt&gt;
&lt;/tt&gt;address: 127.0.0.1&lt;tt&gt;
&lt;/tt&gt;pid_file: tmp/pids/mongrel.pid&lt;tt&gt;
&lt;/tt&gt;servers: 3&lt;tt&gt;
&lt;/tt&gt;docroot: public&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Now we are ready to start our Mongrel cluster and hopefully they fire up. You will want to issue the following command as root user and from the root of your Rails application directory.&lt;/p&gt;

&lt;pre&gt;
mongrel_rails cluster::start
&lt;/pre&gt;

&lt;p&gt;So what happened? If you see the ports starting - well done!&lt;/p&gt;

&lt;pre&gt;
starting port 8000
starting port 8001
&lt;/pre&gt;

&lt;p&gt;Let's get the status of our Mongrel's&lt;/p&gt;

&lt;pre&gt;
mongrel_rails cluster::status
&lt;/pre&gt;

&lt;p&gt;You should hopefully get something similar to:&lt;/p&gt;

&lt;pre&gt;
found pid_file: tmp/pids/mongrel.9000.pid
found mongrel_rails: port 8000, pid 2540

found pid_file: tmp/pids/mongrel.9001.pid
found mongrel_rails: port 8001, pid 2543
&lt;/pre&gt;

&lt;p&gt;If you have issue's with stale PID files, just remove them and restart your Mongrel's.&lt;/p&gt;

&lt;pre&gt;
cd tmp/pids
rm mongrel*
&lt;/pre&gt;

&lt;p&gt;If you are still having trouble with missing Mongrel PID files, you might want to manually kill off each Mongrel process and then try to start your Mongrel cluster again.&lt;/p&gt;

&lt;pre&gt;
## Find the Mongrel process/s
top
## Then hit
shift m
&lt;/pre&gt;

&lt;p&gt;Look for the process number, now we will kill it or them.&lt;/p&gt;

&lt;pre&gt;
kill -15 'process-id'
&lt;/pre&gt;

&lt;p&gt;Now try starting up your Mongrel's. Good luck!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.designrails.com/">
    <author>
      <name>Michael</name>
    </author>
    <id>tag:www.designrails.com,2008-06-20:3</id>
    <published>2008-06-20T00:13:00Z</published>
    <updated>2008-07-02T02:16:35Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Ubuntu"/>
    <category term="mongrel"/>
    <category term="nginx"/>
    <category term="ubuntu"/>
    <link href="http://www.designrails.com/2008/6/20/setting-up-nginx-with-a-mongrel-cluster" rel="alternate" type="text/html"/>
    <title>Part 1:  Setting up Nginx with a Mongrel cluster</title>
<summary type="html">&lt;p&gt;In this article, part one of &lt;strong&gt;setting up &lt;a href=&quot;http://wiki.codemongers.com/Main&quot;&gt;Nginx&lt;/a&gt; with a Mongrel cluster&lt;/strong&gt;, I will walk through how I install and set up a basic Nginx configuration  on my &lt;a href=&quot;http://www.slicehost.com/&quot;&gt;web servers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please note that for this article I will be working with &lt;a href=&quot;https://wiki.ubuntu.com/GutsyGibbon&quot;&gt;Ubuntu Gutsy Gibbon&lt;/a&gt; on my Slice and Mac OSX Tiger on my &lt;a href=&quot;http://en.wikipedia.org/wiki/Localhost&quot;&gt;localhost&lt;/a&gt;. The article also assumes that you have &lt;a href=&quot;http://en.wikipedia.org/wiki/RubyGems&quot;&gt;Rubygems&lt;/a&gt; installed.&lt;/strong&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;In this article, part one of &lt;strong&gt;setting up &lt;a href=&quot;http://wiki.codemongers.com/Main&quot;&gt;Nginx&lt;/a&gt; with a Mongrel cluster&lt;/strong&gt;, I will walk through how I install and set up a basic Nginx configuration  on my &lt;a href=&quot;http://www.slicehost.com/&quot;&gt;web servers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please note that for this article I will be working with &lt;a href=&quot;https://wiki.ubuntu.com/GutsyGibbon&quot;&gt;Ubuntu Gutsy Gibbon&lt;/a&gt; on my Slice and Mac OSX Tiger on my &lt;a href=&quot;http://en.wikipedia.org/wiki/Localhost&quot;&gt;localhost&lt;/a&gt;. The article also assumes that you have &lt;a href=&quot;http://en.wikipedia.org/wiki/RubyGems&quot;&gt;Rubygems&lt;/a&gt; installed.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this article, part one of &lt;strong&gt;setting up &lt;a href=&quot;http://wiki.codemongers.com/Main&quot;&gt;Nginx&lt;/a&gt; with a Mongrel cluster&lt;/strong&gt;, I will walk through how I install and set up a basic Nginx configuration  on my &lt;a href=&quot;http://www.slicehost.com/&quot;&gt;web servers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please note that for this article I will be working with &lt;a href=&quot;https://wiki.ubuntu.com/GutsyGibbon&quot;&gt;Ubuntu Gutsy Gibbon&lt;/a&gt; on my Slice and Mac OSX Tiger on my &lt;a href=&quot;http://en.wikipedia.org/wiki/Localhost&quot;&gt;localhost&lt;/a&gt;. The article also assumes that you have &lt;a href=&quot;http://en.wikipedia.org/wiki/RubyGems&quot;&gt;Rubygems&lt;/a&gt; installed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, if you want to find out what release of Ubuntu you are using, issue the command:&lt;/p&gt;

&lt;pre&gt;
sudo lsb_release -a
&lt;/pre&gt;

&lt;p&gt;Let's now switch to our &lt;a href=&quot;http://en.wikipedia.org/wiki/Sudo&quot;&gt;sudo&lt;/a&gt; account.&lt;/p&gt;

&lt;pre&gt;
sudo -s
&lt;/pre&gt;

&lt;p&gt;Enter your root user account password and then we will move on to the next step.&lt;/p&gt;

&lt;p&gt;We are now going to install Nginx via Ubuntu's package manager &lt;a href=&quot;http://en.wikipedia.org/wiki/Aptitude_%28program%29&quot;&gt;'aptitude'&lt;/a&gt;. Before I had a working version of Nginx via aptitide I would compile it manually, but found that for my needs installing Nginx via the Ubuntu package manager was sufficient. So let's do it now.&lt;/p&gt;

&lt;pre&gt;
apt-get install nginx
&lt;/pre&gt;

&lt;p&gt;Now to find out the what version of Nginx we have just installed (you will see something similar if not the same), we give the following command&lt;/p&gt;

&lt;pre&gt;
nginx -v
&lt;/pre&gt;

&lt;p&gt;You should see somethings similar to the following.&lt;/p&gt;

&lt;pre&gt;
nginx version: nginx/0.5.26
&lt;/pre&gt;

&lt;p&gt;OK, so that was easy enough (I hope you made it). Now let's get on to the actual configuration of Nginx. &lt;/p&gt;

&lt;p&gt;Firstly we need to get into your user directory and make a new directory ready for our Nginx configuration and log files.&lt;/p&gt;

&lt;pre&gt;
cd /home/username/
mkdir nginx
&lt;/pre&gt;

&lt;p&gt;We also want to create some subdirectories as follows:&lt;/p&gt;

&lt;pre&gt;
cd /home/username/nginx/
mkdir tmp logs
&lt;/pre&gt;

&lt;p&gt;Next, and probably one of the most important steps, is your Nginx configuration file. I often put this file in the Nginx directory in my user account, such as:&lt;/p&gt;

&lt;pre&gt;
/home/username/nginx/nginx.conf
&lt;/pre&gt;

&lt;p&gt;Here is a sample &lt;strong&gt;nginx.conf&lt;/strong&gt; file. I use this basic setup. It uses 3 mongrels and 6 worker process'. This may not be appropriate for your applications needs. You should experiment for optimal settings. Just be sure to make all paths correct for your environment and setup.&lt;/p&gt;

&lt;pre&gt;
worker_processes  6;

pid /home/username/nginx/tmp/nginx.pid;

# Valid error reporting levels are debug, notice and info
error_log  /home/username/nginx/logs/error.log info;

events {
    worker_connections  1024;
}

http {
  access_log /home/username/nginx/logs/access.log;
  fastcgi_temp_path /home/username/nginx/tmp/fcgi_temp;
  client_body_temp_path  /home/username/nginx/tmp/client_body 1 2;
  proxy_temp_path /home/username/nginx/tmp/proxy_temp;

  include       /etc/nginx/mime.types;
  default_type  application/octet-stream;

  sendfile              on;
  tcp_nopush            on;
  keepalive_timeout     65;
  tcp_nodelay           off;
  gzip                  on;
  gzip_min_length       1100;
  gzip_buffers          4 8k;
  gzip_types            text/plain text/html text/xhtml text/css text/js;


#-------------------------------------------------#
# www.yourwebsite.com                             #
#-------------------------------------------------#  

 upstream yourwebsitename {
    #### Replace these with the ports for your mongrel cluster:
    server 127.0.0.1:8000;
    server 127.0.0.1:8001;
    server 127.0.0.1:8002;
  }

#-------------------------------------------------#
# Settings for www.yourwebsite.com                #
#-------------------------------------------------#

  server {
    #### Replace with your nginx port and domain name:
    listen       80;
    server_name  yourwebsite.com www.yourwebsite.com;
    #### Replace with the full path to your rails app's public directory:
    root /home/username/yourwebsite.com/current/public;
    index  index.html index.htm;

    ### maintenance page
    if (-f $document_root/system/maintenance.html) {
      rewrite  ^(.*)$  /system/maintenance.html last;
      break;
    }

    location / {
      proxy_set_header  X-Real-IP  $remote_addr;
      proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_redirect false;
      if (-f $request_filename/index.html) {
        rewrite (.*) $1/index.html break;
      }

      if (-f $request_filename.html) {
        rewrite (.*) $1.html break;
      }

      if (!-f $request_filename) {
        ## This is your mongrel upstream name
        proxy_pass http://yourwebsitename;
        break;
      }
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /home/username/yourwebsitename/current/public;
    }
  }

# end of config file
}
&lt;/pre&gt;

&lt;p&gt;We'll that's about all we can do until we get our Mongrel cluster configured and ready to roll, in part 2 of  &lt;strong&gt;&lt;a href=&quot;http://www.designrails.com/2008/6/20/part-2-setting-up-nginx-with-a-mongrel-cluster&quot;&gt;Setting up Nginx with a Mongrel cluster.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
          </content>  </entry>
</feed>
