aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté <mikisabate@gmail.com>2011-11-04 20:54:44 +0100
committerMiquel Sabaté <mikisabate@gmail.com>2011-11-04 20:54:44 +0100
commitaa7db0efe69f213798304e9ddcc1b5a2aadd68cc (patch)
tree8d02202f6c253f07fa07b2933986e9f2487c1af3
parent93de9728efb0e689ce413e980dae685ac0b4b9c3 (diff)
downloaddotfiles-aa7db0efe69f213798304e9ddcc1b5a2aadd68cc.tar.gz
dotfiles-aa7db0efe69f213798304e9ddcc1b5a2aadd68cc.zip
Polishing
-rw-r--r--nginx_unicorn/README.rdoc21
1 files changed, 10 insertions, 11 deletions
diff --git a/nginx_unicorn/README.rdoc b/nginx_unicorn/README.rdoc
index 8b5af0e..d379fdd 100644
--- a/nginx_unicorn/README.rdoc
+++ b/nginx_unicorn/README.rdoc
@@ -6,7 +6,7 @@ I have decided to upload the configuration of my Nginx/Unicorn setup. Please
be aware that:
- I'm using Archlinux and, therefore, the directory hierarchy may change (even for other Linux distros such as Ubuntu).
-- I'll assume that your Rails app is located at /home/mssola/myapp, change it for your own needs.
+- I'll assume that your Rails app is located at /home/mssola/myapp, change it at your own needs.
- I'm not saying that NGinx/Unicorn is the best combo ever. Be sure to understand what is NGinx and Unicorn before going any further.
== Setting up NGinx
@@ -23,33 +23,32 @@ it goes:
# Copy the nginx.server.conf to your Rails application config directory.
# After doing this, you have to edit this file and change the root with
- # the public path of your Rails application, in our case /home/mssola/myapp/public
+ # the public path of your Rails application (in our case /home/mssola/myapp/public).
$ cp nginx.server.conf /home/mssola/myapp/config/nginx.conf
$ vim /home/mssola/myapp/config/nginx.conf
After going through the steps shown above, you should be able to start the
-nginx daemon successfully. If you try to access to localhost, you'll see the
-500 page, because Unicorn is not configured yet, but at least it poves that
+nginx daemon successfully. If you try to access to localhost you'll see the
+500 page because Unicorn is not configured yet, but at least it proves that
NGinx is properly running.
== Setting up Unicorn
My Unicorn configuration assumes that you want as many worker processes as
-CPU cores you have (using a linux-specific command). In order to do this and
+CPU cores you have (using a linux-specific command). In order to change this and
more, please configure the unicorn.rb file. In this file you also have to
change the working directory (WD constant) with the path of your Rails
application (/home/mssola/myapp in our case). After editing this file, you
have to edit the unicorn_init.sh script and change the APP_ROOT variable
with the path of your Rails application (/home/mssola/myapp again :) ). I
-usually place both unicorn files to the config directory of my Rails
+usually place both files to the config directory of my Rails
application. However it's a good practice to copy the script file to the
daemons directory in order to start unicorn at startup (assuming that you
-also start the nginx daemon at startup).
+also start the nginx daemon at startup). With this script you can start,
+stop, upgrade, etc. Unicorn. In fact this script is quite similar to
+the example provided by the Unicorn folks.
-With this script you can start, stop, restart, upgrade,... In fact this script
-is quite similar to the example provided by the Unicorn folks.
-
-== And now what?
+== What's next?
Please be sure to understand what's going on the configurators. In order to
fully understand it, check out the awesome documentation for the NGinx and