<?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>The MikeCam &#187; passenger</title>
	<atom:link href="http://themikecam.com/blog/tag/passenger/feed/" rel="self" type="application/rss+xml" />
	<link>http://themikecam.com/blog</link>
	<description>The blog of Miquel Rodriguez Telep (aka Michael Rodriguez-Torrent)</description>
	<lastBuildDate>Wed, 25 Jan 2012 10:33:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Install Phusion Passenger / mod_rails on a cPanel host</title>
		<link>http://themikecam.com/blog/2010/04/13/install-phusion-passenger-mod_rails-on-a-cpanel-host/</link>
		<comments>http://themikecam.com/blog/2010/04/13/install-phusion-passenger-mod_rails-on-a-cpanel-host/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 13:15:57 +0000</pubDate>
		<dc:creator>Miquel Rodríguez Telep / Michael Rodríguez-Torrent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://themikecam.com/blog/?p=797</guid>
		<description><![CDATA[I recently had occasion to set up Passenger/mod_rails on a cPanel server. There is some varying and dated information around the web, so I thought I would share current best practice: First you&#8217;ll need to SSH to your server and &#8230; <a href="http://themikecam.com/blog/2010/04/13/install-phusion-passenger-mod_rails-on-a-cpanel-host/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had occasion to set up Passenger/mod_rails on a cPanel server. There is some varying and dated information around the web, so I thought I would share current best practice:</p>
<p>First you&#8217;ll need to SSH to your server and perform all the following commands as root or via sudo:</p>
<pre class="brush: bash; light: true; title: ; notranslate">$ su</pre>
<p>Let cPanel set up Ruby and Rails the way it wants:</p>
<pre class="brush: bash; light: true; title: ; notranslate">
$ /scripts/installruby
$ /usr/local/cpanel/bin/ror_setup
</pre>
<p>Install passenger the normal way (see <a href="http://www.modrails.com/install.html">Passenger docs</a>):</p>
<pre class="brush: bash; light: true; title: ; notranslate">
$ gem install passenger
$ passenger-install-apache2-module
</pre>
<p>Create /usr/local/apache/conf/passenger.conf with the lines that the Passenger install script tells you to add to your Apache configuration file, e.g.:<br />
[apache22]<br />
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so<br />
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11<br />
PassengerRuby /usr/bin/ruby<br />
[/apache22]</p>
<p>Include the Passenger config by editing /usr/local/apache/conf/httpd.conf and, somewhere near the beginning, adding:<br />
[apache22 light="true"]Include &quot;/usr/local/apache/conf/passenger.conf&quot;[/apache22]</p>
<p>We want to make sure cPanel preserves our edits to httpd.conf when it does updates, so we need to run:</p>
<pre class="brush: bash; light: true; title: ; notranslate">$ /usr/local/cpanel/bin/apache_conf_distiller --update --main</pre>
<p>Restart Apache with</p>
<pre class="brush: bash; light: true; title: ; notranslate">$ /scripts/restartsrv_httpd</pre>
<p>Upload your Rails app to somewhere outside of public_html (e.g. ~/rails_apps/yourapp) or use cPanel&#8217;s &#8220;Software / Services &gt; Ruby on Rails&#8221; functions to create a new one.</p>
<p>Login to your domain&#8217;s cPanel and go to &#8220;Domains &gt; Subdomains&#8221;<br />
Create a new subdomain whose document root is path/to/yourapp/public<br />
Make sure it&#8217;s pointing to yourapp/<span style="font-weight: bold;">public</span></p>
<p>Visit your subdomain and see your app running &#8212; easy!</p>
]]></content:encoded>
			<wfw:commentRss>http://themikecam.com/blog/2010/04/13/install-phusion-passenger-mod_rails-on-a-cpanel-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

