<?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>Phat Site Blog &#187; phusion passenger</title>
	<atom:link href="http://blog.phatsite.com/tag/phusion-passenger/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.phatsite.com</link>
	<description>Web Stuff is Easy</description>
	<lastBuildDate>Sun, 29 Jan 2012 20:00:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Get Your New Server Setup with Ruby on Rails and Phusion Passenger</title>
		<link>http://blog.phatsite.com/server-maintenance/get-your-new-server-setup-with-ruby-on-rails-and-phusion-passenger/</link>
		<comments>http://blog.phatsite.com/server-maintenance/get-your-new-server-setup-with-ruby-on-rails-and-phusion-passenger/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 02:03:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server Maintenance]]></category>
		<category><![CDATA[phusion passenger]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.phatsite.com/?p=25</guid>
		<description><![CDATA[Phusion Passenger will make your web applications run without any need to do maintenance.  Let it moderate the resources by itself!
Phusion Passenger (mod_rails/mod_rack) is an apache module that makes deployment of Ruby/Rails applications as simple as PHP applications. It does not require use of any ruby specific tools to deploy application. All you have to [...]]]></description>
			<content:encoded><![CDATA[<p>Phusion Passenger will make your web applications run without any need to do maintenance.  Let it moderate the resources by itself!</p>
<p>Phusion Passenger (mod_rails/mod_rack) is an apache module that makes deployment of Ruby/Rails applications as simple as PHP applications. It does not require use of any ruby specific tools to deploy application. All you have to do is copy your source files in appropriate directories on server and your code changes will be deployed. Main advantage of passenger is it allows to deploy rails application reliably on shared hosting environment. Passenger is not available for windows.</p>
<p>Lets see how to install Passenger on Cent OS. Cent OS 5.1 comes with Apache 2.2.3 installed. First of all make sure Ruby, Gems, Rails and ruby development headers is installed on the system, Issue following commands as root:</p>
<p>yum install ruby<br />
yum install irb<br />
yum install rdoc<br />
yum install ruby-devel</p>
<p>Installing rubygems manually because distro dependencies:<br />
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz<br />
tar -zxvf rubygems-1.3.1.tgz<br />
ruby setup.rb</p>
<p>If you get:<br />
RubyGems installed the following executables:<br />
/usr/bin/gem</p>
<p>RubyGems is install and let&#8217;s move on.</p>
<p>Now install rails gems, it might take a while:</p>
<p>gem install rails -y<br />
yum install httpd-devel &#8211; this might be already installed</p>
<p>Now, we are ready to install passenger.  It&#8217;s actually pretty easy to setup:<br />
gem install passenger</p>
<p>After installing passenger and its dependencies make sure that Apache is stopped, launch passenger installer for Apache module from command line.</p>
<p>passenger-install-apache2-module</p>
<p>This will setup Apache2, teach you to configure apache and deploy your Ruby App.  You will be given instructions to add a few lines to the apache configuration file, let&#8217;s do that now.</p>
<p>vim /etc/httpd/conf/httpd.conf</p>
<p>Look for this:<br />
#<br />
# The following modules are not loaded by default:<br />
#<br />
#LoadModule cern_meta_module modules/mod_cern_meta.so<br />
#LoadModule asis_module modules/mod_asis.so</p>
<p>And add these three lines right below it:</p>
<p>LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so<br />
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.6<br />
PassengerRuby /usr/bin/ruby</p>
<p>After the module is installed, go ahead and create a user app.  I&#8217;ll show you how to make one if you created a new user. Run:<br />
su newuser<br />
cd /home/newuser/www<br />
rails demo</p>
<p>Now, log back into root and mod the directory to be read:<br />
exit<br />
chmod 755 /home/newuser</p>
<p>We need to setup the virtual host for this application.  Add these lines at bottom of file:</p>
<p>&lt;VirtualHost *:80&gt;<br />
ServerName www.demo.com<br />
DocumentRoot /home/newuser/www/demo/public<br />
&lt;/VirtualHost&gt;</p>
<p>Make sure DocumentRoot points to public directory of your rails application. Also add server name alias to hosts file in /etc/ folder. Now start apache server from console.</p>
<p>service httpd start</p>
<p>Your new rails application should be running now with Phusion Passenger.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phatsite.com/server-maintenance/get-your-new-server-setup-with-ruby-on-rails-and-phusion-passenger/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

