<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>stew (@) rtmatheson.com &#187; nginx</title>
	<atom:link href="http://rtmatheson.com/tag/nginx/feed/" rel="self" type="application/rss+xml" />
	<link>http://rtmatheson.com</link>
	<description>My name is Stewart Matheson. I work with code, servers and anything else that makes the web work.  I am also avaiable for hire to help you with any of your projects.</description>
	<lastBuildDate>Mon, 12 Dec 2011 02:02:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Setting up Nginx to work with Rails, Capistrano and SSL.</title>
		<link>http://rtmatheson.com/2011/07/setting-up-nginx-to-work-with-rails-capistrano-and-ssl/</link>
		<comments>http://rtmatheson.com/2011/07/setting-up-nginx-to-work-with-rails-capistrano-and-ssl/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 12:15:42 +0000</pubDate>
		<dc:creator>Stewart Matheson</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rvm]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[sudoers]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[useradd]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://rtmatheson.com/?p=316</guid>
		<description><![CDATA[I need to set up a billing system. I want to run you though how to set up such a system on a server complete with SSL and nginx as its a rails application we are deploying. I will be using a brand new install of Ubuntu however the ideas in this post should work [...]]]></description>
			<content:encoded><![CDATA[<p>I need to set up a billing system. I want to run you though how to set up such a system on a server complete with SSL and nginx as its a rails application we are deploying. I will be using a brand new install of Ubuntu however the ideas in this post should work with any server. First off lets set up our linux box</p>
<h3>Base Linux Setup</h3>
<p>After you log in the first time you want to change your root password.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">passwd</span></pre></div></div>

<p>The system will prompt you to change the root password. Once you have done this then you can create a new user. You should NEVER log in with the root user.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">adduser username</pre></div></div>

<p>This command will prompt you to enter details about the user your creating however you only really need to enter the password. This is the user that we will use from this stage on so we need to add it to sudoers. If the user is not a sudoer then we cant install/compile anything. Nor can we make changes to system settings. Open the sudoers file with your favorite editor and add the following line</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sudoers
<span style="color: #666666; font-style: italic;">## Add this line to the file</span>
username <span style="color: #007800;">ALL</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>ALL<span style="color: #7a0874; font-weight: bold;">&#41;</span>       ALL</pre></div></div>

<p>Where username is the name of the user you have just created. Great now we have done this we have a user account and we don&#8217;t need to worry about our root user any more. Log out and then log back in with the new user. You should be able to run sudo commands.</p>
<h3>SSH</h3>
<p>First lets set up SSH Keys. This allows us to log in to our server with out having to enter a password. This is such a time saver and worth setting up. Any time we are doing a deployment using capistrano we are going to be glad to have our SSH key in place. First off if you don&#8217;t have it create a .ssh folder in your home directory(on your local machine &#8211; not on the server). Windows users&#8230; sorry your on your own here. You might have to read the PuTTY doc.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> .ssh</pre></div></div>

<p>After you have created the .ssh folder cd to it and run&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> rsa</pre></div></div>

<p>This will create two files. One public and one private key. Never give out the private key. The public key can be given to anyone. In this case we are going to put the public key on our server. The public key is called id_rsa.pub.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa.pub username<span style="color: #000000; font-weight: bold;">@</span>serveraddress:</pre></div></div>

<p>You will have to enter your password here. Once we have the key up there log back in to your server. You will still have to enter the password at this stage. You need to move the key file to a file called authorized_keys and set the ownership and permissions correctly on it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> .ssh
<span style="color: #c20cb9; font-weight: bold;">mv</span> id_rsa.pub .ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> username:username .ssh<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">700</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">600</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys</pre></div></div>

<p>Done! Logout and log back in. You should NOT be asked for a password. Once we have our keys set up there is one more thing that I would recommend doing at this stage. Changing the default SSH port. I always like  to use the same port so set it to something that you will remember. Write it down because if you can not remember the port number you may be locked out of your system. To change the port we need to edit the ssh config file. Do so like this&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>sshd_config</pre></div></div>

<p>The port setting should be on the first line. Chagne it save the file. The settings will not take effect until you restart ssh.  At this point I would recommend you set up IP tables. While I am not going to talk about this in the first revision of this post I intend to add it later down the track when I have more time.</p>
<p>Now restart sshd</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> reload</pre></div></div>

<p>When you login you should use the new port. Remember that ssh keys do not have any port information so you will still need to tell ssh what port we want to use as its no longer set to default.</p>
<h3>Install Ruby</h3>
<p>Once we have logged back in we need to install RVM. Ruby Version Manager is a great application that will help us manage ruby versions and gemsets. We can have many different gemsets and different versions of ruby. This allows us to serve applications from the same server in different ways.</p>
<p>First lets install some dependencies that RVM has.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> git-core curl build-essential <span style="color: #c20cb9; font-weight: bold;">vim</span> libcurl4-openssl-dev</pre></div></div>

<p>Next we run the remote script that will install and setup rvm for us</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span>
user$ <span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>curl <span style="color: #660033;">-s</span> https:<span style="color: #000000; font-weight: bold;">//</span>rvm.beginrescueend.com<span style="color: #000000; font-weight: bold;">/</span>install<span style="color: #000000; font-weight: bold;">/</span>rvm<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>This script will use git to download RVM and install it. Note how we changed to the super user. This is because we want RVM multisite install. This is best for when we are installing RVM on servers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">type</span> rvm <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-1</span></pre></div></div>

<p>This should output the string &#8220;rvm is a function&#8221;. If so then we are in business and rvm has been installed.</p>
<p>We still have not installed ruby. Ruby its self has a number of dependencies. Lets install them first. The package names may differ from distro to distro so you might want to double check what all of them are. They should work for ubuntu though.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential <span style="color: #c20cb9; font-weight: bold;">bison</span> openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-<span style="color: #000000;">0</span> libsqlite3-dev sqlite3 libxml2-dev libxslt-dev <span style="color: #c20cb9; font-weight: bold;">autoconf</span></pre></div></div>

<p>Currently we only have sqlite. If you want to use mysql run the following line.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-server libmysqlclient-dev libmysql-ruby</pre></div></div>

<p>Now lets use RVM to install some packages for ruby.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rvm pkg <span style="color: #c20cb9; font-weight: bold;">install</span> zlib
rvm pkg <span style="color: #c20cb9; font-weight: bold;">install</span> openssl
rvm pkg <span style="color: #c20cb9; font-weight: bold;">install</span> readline</pre></div></div>

<p>Now we can install ruby 1.9.2</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rvm <span style="color: #c20cb9; font-weight: bold;">install</span> 1.9.2 <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #007800;">$rvm_path</span><span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-openssl-dir</span>=<span style="color: #007800;">$rvm_path</span><span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-readline-dir</span>=<span style="color: #007800;">$rvm_path</span><span style="color: #000000; font-weight: bold;">/</span>usr</pre></div></div>

<p>Now we need to install bundler and passenger so we need to create a gem set. Gemsets are logical groups of gems. I normally go one gem set per application.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rvm gemset create application_name</pre></div></div>

<p>Now install bundler. This is how rails will manage the gems it needs.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem <span style="color: #c20cb9; font-weight: bold;">install</span> bundler</pre></div></div>

<p>OK now we have ruby installed lets install the passenger gem. This makes live so easy as it will configure and compile nginx for us.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem <span style="color: #c20cb9; font-weight: bold;">install</span> passenger</pre></div></div>

<p>Once we have the gem installed we have access to some VERY helpful commands. passenger-install-nginx-module is the one we are going to run. This will install passenger for us and better yet it will go ahead and compile nginx for us too. All the time checking for any software that nginx might need. Very handy. I will not guide you though this process aside from running the command because the Phusion guys have created an amazing easy to use installer. To start the installer run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rvmsudo passenger-install-nginx-module</pre></div></div>

<p>Once we are complete nginx will be installed with passenger and our webserver will be set up. Phusion even include the SSL module for Nginx which is great because we will need to use it for our credit card gateway. Incase you missed it nginx also gives you a configuration snippet. Incase you missed it here it is.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">server <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    listen <span style="color: #000000;">80</span>;
    server_name www.yourhost.com;
    root <span style="color: #000000; font-weight: bold;">/</span>somewhere<span style="color: #000000; font-weight: bold;">/</span>public;   <span style="color: #666666; font-style: italic;"># &lt;--- be sure to point to 'public'!                                                       </span>
    passenger_enabled on;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>We will keep this handy as we will need it for our rails application when we set it up. Now we have everything installed we need to get a rails application on our server. I am going to assume you already have an application and that you are ready for deployment.</p>
<h3>Deploying The Application</h3>
<p>We will use capistrano to manage the deployment of the application. Lets log out of our server and go back to our application so we can install the capistrano gem locally. I will assume that your using RVM on your development machine and have not already got cap installed</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem <span style="color: #c20cb9; font-weight: bold;">install</span> capistrano</pre></div></div>

<p>With the gem installed lets &#8220;capify&#8221; our project. Make sure your in your current project directory and run the following command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">capify .</pre></div></div>

<p>This should create a couple of files but the one we are interested in is deploy.rb. This file holds all of the details that cap needs to deploy the application to our server. It also gives us a place to write any extra tasks that might need to be performed on our application.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">$:.<span style="color:#9900CC;">unshift</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">expand_path</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'./lib'</span>, ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'rvm_path'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> 
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">&quot;rvm/capistrano&quot;</span>                  
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">&quot;bundler/capistrano&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:rvm_ruby_string</span>, <span style="color:#996600;">'1.9.2@gemset'</span>
set <span style="color:#ff3333; font-weight:bold;">:rvm_bin_path</span>, <span style="color:#996600;">&quot;/usr/local/rvm/bin&quot;</span></pre></div></div>

<p>The above code tells cap what gem set we want or application to useon the server. It also tells cap that we are working with a single user install of RVM. Cap has a number of other details that need to be set for the deployment to work correctly. These include user names and server addresses. At this stage I like to add some tasks to my cap deploy file. These are&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">namespace <span style="color:#ff3333; font-weight:bold;">:db</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  desc <span style="color:#996600;">&quot;Create database yaml in shared path&quot;</span> 
  task <span style="color:#ff3333; font-weight:bold;">:default</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    db_config = <span style="color:#CC00FF; font-weight:bold;">ERB</span>.<span style="color:#9900CC;">new</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;-</span>EOF
    base: <span style="color:#006600; font-weight:bold;">&amp;</span>base
      adapter: mysql
      username: username
      password: password
&nbsp;
    development:
      database: <span style="color:#008000; font-style:italic;">#{application}_dev</span>
      <span style="color:#006600; font-weight:bold;">&lt;&lt;</span>: <span style="color:#006600; font-weight:bold;">*</span>base
&nbsp;
    test:
      database: <span style="color:#008000; font-style:italic;">#{application}_test</span>
      <span style="color:#006600; font-weight:bold;">&lt;&lt;</span>: <span style="color:#006600; font-weight:bold;">*</span>base
&nbsp;
    production:
      database: <span style="color:#008000; font-style:italic;">#{application}_production</span>
      <span style="color:#006600; font-weight:bold;">&lt;&lt;</span>: <span style="color:#006600; font-weight:bold;">*</span>base
    EOF
&nbsp;
    run <span style="color:#996600;">&quot;mkdir -p #{shared_path}/config&quot;</span> 
    put db_config.<span style="color:#9900CC;">result</span>, <span style="color:#996600;">&quot;#{shared_path}/config/database.yml&quot;</span> 
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  desc <span style="color:#996600;">&quot;Make symlink for database yaml&quot;</span> 
  task <span style="color:#ff3333; font-weight:bold;">:symlink</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    run <span style="color:#996600;">&quot;ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml&quot;</span> 
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
namespace <span style="color:#ff3333; font-weight:bold;">:rvm</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  desc <span style="color:#996600;">&quot;Create correct RVM file&quot;</span>
  task <span style="color:#ff3333; font-weight:bold;">:create_rvmrc</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    run <span style="color:#996600;">&quot;cd #{current_path} &amp;&amp; rvm use 1.9.2@#{application} --rvmrc --create&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
before <span style="color:#996600;">&quot;deploy:setup&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:db</span>
after <span style="color:#996600;">&quot;deploy:update_code&quot;</span>, <span style="color:#996600;">&quot;db:symlink&quot;</span>
after <span style="color:#996600;">&quot;deploy:symlink&quot;</span>, <span style="color:#996600;">&quot;rvm:create_rvmrc&quot;</span></pre></div></div>

<p>The above tasks manage our database configuration and create the correct RVM file. They are very handy as they completely automate the install on the server.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cap deploy:setup</pre></div></div>

<p>This will login to the server and create all the folders. This is where our rails application will be set up on our server. Note how we don&#8217;t have to enter a password. SSH keys are great when dealing with cap because entering a password for each deployment gets old quickly.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cap deploy:check</pre></div></div>

<p>Cap will go ahead and make sure your server has correct permissions to deploy your application. It will also check for any needed software such as source control managers. Once this is done and works then we are ready to deploy our application. Next lets deploy our application</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cap deploy</pre></div></div>

<p>This will install the application on the server in the deploy_to path. It will also create a number of symlinks. Its a great way of deploying an application because if something goes wrong it will roll back to the last version. Since this is the first time that we have deployed this does not apply to us. Now lets set up the database.yml file on our server. This is done with the &#8220;db&#8221; cap task.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cap db</pre></div></div>

<p>Run another cap deploy after this and the database file will correctly link to the application. The next thing to do is create a database for the application and a database user.  In the cap task make sure you replace username and password with the user account we are about to set up in mysql. Remember these can be any username and password you like. Just remember that the username and password in the database.yml file need to match what has been created in mysql. To create the user and pass in mysql do the following</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">DATABASE</span> application_name_production;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">USER</span> <span style="color: #ff0000;">'username'</span>@<span style="color: #ff0000;">'localhost'</span> <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'password'</span>;
<span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> PRIVILEGES <span style="color: #993333; font-weight: bold;">ON</span> application_name_production<span style="color: #66cc66;">.*</span> <span style="color: #993333; font-weight: bold;">TO</span> <span style="color: #ff0000;">'username'</span>@<span style="color: #ff0000;">'localhost'</span>
<span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">OPTION</span>;</pre></div></div>

<h3>Basic overview on SSL</h3>
<p>SSL uses private key authentication to verify that a site is who it claims to be. This is done by matching up keys. Much the same way as installing SSH keys works. To do this we generate our own private key. This is super secret! We do this on our server and it stays on the server. It is a security risk taking it off the server as you will have to transfer it over a network(this is unless you have physical access to your server). With this private key we create a certificate signing request. This CSR is then given to our SSL provider. Based on the CSR your SSL provider will create a certificate and send it back to you. They might do this via email as there is no risk if your certificate is out in the open. This certificate will only match the private key that we have on our server meaning that there is only one server that the certificate will match. Your SSL provider should have information available on how to prepare the certificate for use with Nginx as most people will most likely be running Apache(poor fools). One you have th crt file ready to go we point Nginx at that file and the private key we generated. The server will match the two up and users will be safe sending their credit card details via https.</p>
<h3>Configuring Nginx with SSL</h3>
<p>Okay so we have everything installed. We have our application deployed. We have our application settings correct (we think&#8230; time will tell). The next thing to do is configure nginx to pick up on our rails application and work over SSL. Remember the code snippet we got when we installed nginx. Place that in your nginx config file with some changes. Here is the code snippet set up to work for SSL.</p>
<p>Open nginx.conf</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>nginx.conf</pre></div></div>

<p>Add our server configuration.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">server <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        listen <span style="color: #000000;">443</span>;
        server_name domain.com;
        root <span style="color: #000000; font-weight: bold;">/</span>where<span style="color: #000000; font-weight: bold;">/</span>your<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>is;
        passenger_enabled on;
        ssl on;
        ssl_certificate <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>server.crt;
        ssl_certificate_key <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>server.key;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Note the ssl configuration is pointing at two files. A certificate and a key. For this setup we will generate the certificate and sign it our selves. This will NOT do in production as it will show users that the certificate is not trusted however for now its fine.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>certs
openssl genrsa <span style="color: #660033;">-des3</span> <span style="color: #660033;">-out</span> server.key <span style="color: #000000;">1024</span>
openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-key</span> server.key <span style="color: #660033;">-out</span> server.csr
<span style="color: #c20cb9; font-weight: bold;">cp</span> server.key server.key.org
openssl rsa <span style="color: #660033;">-in</span> server.key.org <span style="color: #660033;">-out</span> server.key
openssl x509 <span style="color: #660033;">-req</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">365</span> <span style="color: #660033;">-in</span> server.csr <span style="color: #660033;">-signkey</span> server.key <span style="color: #660033;">-out</span> server.crt</pre></div></div>

<p>OK now we have nginx all ready to go lets create our init script. The init script allows us to stop and start nginx when we need to and its not provided for us when we install nginx via passenger.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>nginx</pre></div></div>

<p>Add the following to this file and save.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### BEGIN INIT INFO</span>
<span style="color: #666666; font-style: italic;"># Provides:          nginx</span>
<span style="color: #666666; font-style: italic;"># Required-Start:    $all</span>
<span style="color: #666666; font-style: italic;"># Required-Stop:     $all</span>
<span style="color: #666666; font-style: italic;"># Default-Start:     2 3 4 5</span>
<span style="color: #666666; font-style: italic;"># Default-Stop:      0 1 6</span>
<span style="color: #666666; font-style: italic;"># Short-Description: starts the nginx web server</span>
<span style="color: #666666; font-style: italic;"># Description:       starts nginx using start-stop-daemon</span>
<span style="color: #666666; font-style: italic;">### END INIT INFO</span>
&nbsp;
&nbsp;
<span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>nginx
<span style="color: #007800;">NAME</span>=nginx
<span style="color: #007800;">DESC</span>=nginx
&nbsp;
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-x</span> <span style="color: #007800;">$DAEMON</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Include nginx defaults if available</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>nginx <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
        . <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>nginx
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
  start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Starting <span style="color: #007800;">$DESC</span>: &quot;</span>
        start-stop-daemon <span style="color: #660033;">--start</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--pidfile</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>.pid \
                <span style="color: #660033;">--exec</span> <span style="color: #007800;">$DAEMON</span> <span style="color: #660033;">--</span> <span style="color: #007800;">$DAEMON_OPTS</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NAME</span>.&quot;</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Stopping <span style="color: #007800;">$DESC</span>: &quot;</span>
        start-stop-daemon <span style="color: #660033;">--stop</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--pidfile</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>.pid \
                <span style="color: #660033;">--exec</span> <span style="color: #007800;">$DAEMON</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NAME</span>.&quot;</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  restart<span style="color: #000000; font-weight: bold;">|</span>force-reload<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Restarting <span style="color: #007800;">$DESC</span>: &quot;</span>
        start-stop-daemon <span style="color: #660033;">--stop</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--pidfile</span> \
                <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>.pid <span style="color: #660033;">--exec</span> <span style="color: #007800;">$DAEMON</span>
        <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span>
        start-stop-daemon <span style="color: #660033;">--start</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--pidfile</span> \
                <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>.pid <span style="color: #660033;">--exec</span> <span style="color: #007800;">$DAEMON</span> <span style="color: #660033;">--</span> <span style="color: #007800;">$DAEMON_OPTS</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NAME</span>.&quot;</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  reload<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Reloading <span style="color: #007800;">$DESC</span> configuration: &quot;</span>
      start-stop-daemon <span style="color: #660033;">--stop</span> <span style="color: #660033;">--signal</span> HUP <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--pidfile</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>.pid \
          <span style="color: #660033;">--exec</span> <span style="color: #007800;">$DAEMON</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NAME</span>.&quot;</span>
      <span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #007800;">N</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: <span style="color: #007800;">$N</span> {start|stop|restart|force-reload}&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span>
        <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>

<p>Now we have everything set up lets start nginx.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>nginx start</pre></div></div>

<p>Once this is started point your browser to the correct domain via https and test your site out. Good luck!</p>
<h3>Sources</h3>
<p><a href="http://articles.slicehost.com/2010/10/18/ubuntu-maverick-setup-part-1">http://articles.slicehost.com/2010/10/18/ubuntu-maverick-setup-part-1</a></p>
<p><a href="http://articles.slicehost.com/2007/12/19/ubuntu-gutsy-nginx-ssl-and-vhosts">http://articles.slicehost.com/2007/12/19/ubuntu-gutsy-nginx-ssl-and-vhosts</a></p>
<p><a href="http://www.modrails.com/install.html">http://www.modrails.com/install.html</a></p>
<p><a href="http://blog.bigrocksoftware.com/2011/01/07/rvm-nginx-passenger-rails-3/">http://blog.bigrocksoftware.com/2011/01/07/rvm-nginx-passenger-rails-3/</a></p>
<p><a href="https://rvm.beginrescueend.com/rvm/install/">https://rvm.beginrescueend.com/rvm/install/</a></p>
<p><a href="http://excid3.com/blog/ruby-on-rails-3-and-mysql-on-ubuntu-10-10/">http://excid3.com/blog/ruby-on-rails-3-and-mysql-on-ubuntu-10-10/</a></p>
<p><a href="http://stackoverflow.com/questions/3644897/rvm-cannot-use-ruby-with-sudo">http://stackoverflow.com/questions/3644897/rvm-cannot-use-ruby-with-sudo</a></p>
<p><a href="http://help.github.com/deploy-with-capistrano/">http://help.github.com/deploy-with-capistrano/</a></p>
<p><a href="http://beginrescueend.com/integration/capistrano/">http://beginrescueend.com/integration/capistrano/</a></p>
<p><a href="http://blog.ninjahideout.com/posts/a-guide-to-a-nginx-passenger-and-rvm-server">http://blog.ninjahideout.com/posts/a-guide-to-a-nginx-passenger-and-rvm-server</a></p>
<p><a href="http://blog.ninjahideout.com/posts/the-path-to-better-rvm-and-passenger-integration">http://blog.ninjahideout.com/posts/the-path-to-better-rvm-and-passenger-integration</a></p>
<p><a href="http://stackoverflow.com/questions/4349628/rails-3-app-deployment-bundler-rake-issues">http://stackoverflow.com/questions/4349628/rails-3-app-deployment-bundler-rake-issues</a></p>
<p><a href="http://wiki.nginx.org/HttpSslModule">http://wiki.nginx.org/HttpSslModule</a></p>
<h3>Post updates</h3>
<p>23/08/2011 Added links to sources, added intro to ssl.</p>
]]></content:encoded>
			<wfw:commentRss>http://rtmatheson.com/2011/07/setting-up-nginx-to-work-with-rails-capistrano-and-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Installing Nginx, Apache and SVN</title>
		<link>http://rtmatheson.com/2010/04/installing-nginx-apache-and-svn/</link>
		<comments>http://rtmatheson.com/2010/04/installing-nginx-apache-and-svn/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 14:38:23 +0000</pubDate>
		<dc:creator>Stewart Matheson</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://rtmatheson.com/?p=153</guid>
		<description><![CDATA[In this video I install Nginx Apache and SVN. Download links are here&#8230; http://mirror.lividpenguin.com/pub/apache/httpd/httpd-2.2.15.tar.gz http://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz http://nginx.org/download/nginx-0.7.65.tar.gz Here are the apache configurations I used &#60;IfModule mpm_prefork_module&#62; StartServers 1 MinSpareServers 1 MaxSpareServers 1 MaxClients 10 MaxRequestsPerChild 0 &#60;/IfModule&#62; &#160; &#60;Location /repos&#62; DAV svn SVNPath /usr/local/nginx_svn_test/testrepos SVNAutoversioning on Options Indexes FollowSymLinks Order allow,deny Allow from all &#60;/Location&#62; This [...]]]></description>
			<content:encoded><![CDATA[<p>In this video I install Nginx Apache and SVN.  Download links are here&#8230;</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10719817&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10719817&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>
<p>http://mirror.lividpenguin.com/pub/apache/httpd/httpd-2.2.15.tar.gz</p>
<p>http://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz</p>
<p>http://nginx.org/download/nginx-0.7.65.tar.gz</p>
<p>Here are the apache configurations I used</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IfModule</span> mpm_prefork_module<span style="color: #000000; font-weight: bold;">&gt;</span></span>
    StartServers          1
    MinSpareServers       1
    MaxSpareServers       1
    MaxClients           10
    MaxRequestsPerChild   0
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Location</span> /repos<span style="color: #000000; font-weight: bold;">&gt;</span></span>
    DAV svn
    SVNPath /usr/local/nginx_svn_test/testrepos
    SVNAutoversioning on
    Options Indexes FollowSymLinks
    Order allow,deny
    Allow from all
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Location<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This is the Nginx proxy pass configuration</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">location <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  proxy_pass http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">86</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>The following is the line that configures the apache compile.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-dav</span> <span style="color: #660033;">--enable-dav-fs</span> <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx_svn_test <span style="color: #660033;">--disable-alias</span> <span style="color: #660033;">--disable-userdir</span> <span style="color: #660033;">--disable-actions</span> <span style="color: #660033;">--disable-dir</span> <span style="color: #660033;">--disable-negotiation</span> <span style="color: #660033;">--disable-cgi</span> <span style="color: #660033;">--disable-cgid</span> <span style="color: #660033;">--disable-status</span>      <span style="color: #660033;">--disable-autoindex</span> <span style="color: #660033;">--disable-asis</span> <span style="color: #660033;">--disable-mime</span> <span style="color: #660033;">--disable-version</span> <span style="color: #660033;">--disable-setenvif</span> <span style="color: #660033;">--disable-env</span> <span style="color: #660033;">--disable-log-config</span> <span style="color: #660033;">--disable-include</span> <span style="color: #660033;">--disable-filter</span> <span style="color: #660033;">--disable-auth-basic</span> <span style="color: #660033;">--disable-authz-default</span> <span style="color: #660033;">--disable-authz-user</span> <span style="color: #660033;">--disable-authz-groupfile</span> <span style="color: #660033;">--disable-authz-host</span> <span style="color: #660033;">--disable-authn-default</span> <span style="color: #660033;">--disable-authn-file</span></pre></div></div>

<p>The following is the configure line for the SVN install.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx_apache_svn_test <span style="color: #660033;">--with-apxs</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx_apache_svn_test<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>apxs</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://rtmatheson.com/2010/04/installing-nginx-apache-and-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

