<?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>Wylie &#187; Cloud Hosting</title>
	<atom:link href="http://www.wyliethomas.com/blog/tag/cloud-hosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wyliethomas.com/blog</link>
	<description>web consultant.developer.angler</description>
	<lastBuildDate>Wed, 07 Dec 2011 18:14:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hosting on AWS part 2</title>
		<link>http://www.wyliethomas.com/blog/2009/09/16/hosting-on-aws-part-2/</link>
		<comments>http://www.wyliethomas.com/blog/2009/09/16/hosting-on-aws-part-2/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 06:35:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Cloud Hosting]]></category>

		<guid isPermaLink="false">http://www.wyliethomas.com/blog/?p=46</guid>
		<description><![CDATA[Now i just want to run my rails app in production mode through apache instead of mongrel. Here is what I did.
First I needed to install apache.
yum install httpd
Then kill the existing mongrel process
pkill -9 mongrel_rails -u root
With apache installed I now have the directories I need. I moved my rails app from my webuser [...]]]></description>
			<content:encoded><![CDATA[<p>Now i just want to run my rails app in production mode through apache instead of mongrel. Here is what I did.</p>
<p>First I needed to install apache.<br />
<code>yum install httpd</code></p>
<p>Then kill the existing mongrel process<br />
<code>pkill -9 mongrel_rails -u root</code></p>
<p>With apache installed I now have the directories I need. I moved my rails app from my webuser directory to my apache directory at /var/www/html.</p>
<p>Now i can start apache<br />
<code>apachectl start</code><br />
If you go to your primary dns in a browser you should see the default fedora apache page.</p>
<p>Next I installed passenger<br />
<code>gem install passenger</code></p>
<p>Then the apache mod<br />
<code>passenger-install-apache2-module</code></p>
<p>Since I was using one of the pre-set AMI&#8217;s I am promted to install a few things.<br />
 * To install GNU C++ compiler:<br />
   Please run <code>yum install gcc-c++</code> as root.</p>
<p> * To install Apache 2 development headers:<br />
   Please run<code> yum install httpd-devel</code> as root.</p>
<p> * To install Apache Portable Runtime (APR) development headers:<br />
   Please run <code>yum install apr-deve</code>l as root</p>
<p>Then add these to the httpd.conf file<br />
<code>LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so<br />
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5<br />
PassengerRuby /usr/bin/ruby</code></p>
<p>And add a virtual host to the conf file the way described in the apache mod install instructions.</p>
<p>Then restart apache<br />
<code>apachectl restart</code></p>
<p>That was it. My rails app is now running through apache.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wyliethomas.com/blog/2009/09/16/hosting-on-aws-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting on AWS</title>
		<link>http://www.wyliethomas.com/blog/2009/09/15/hosting-on-aws/</link>
		<comments>http://www.wyliethomas.com/blog/2009/09/15/hosting-on-aws/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 05:49:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Cloud Hosting]]></category>

		<guid isPermaLink="false">http://www.wyliethomas.com/blog/?p=40</guid>
		<description><![CDATA[Just some notes from setting up a Ruby on Rails instance on AWS EC2.
During the set up process of the instance you will be able to download a private key. Put that private key in a safe directory and chmod it to 400.
Then after completing the setup of the instance and you can see that [...]]]></description>
			<content:encoded><![CDATA[<p>Just some notes from setting up a Ruby on Rails instance on AWS EC2.</p>
<p>During the set up process of the instance you will be able to download a private key. Put that private key in a safe directory and chmod it to 400.</p>
<p>Then after completing the setup of the instance and you can see that it is running, go to your command line and enter:</p>
<p><code>ssh -i /path/to/key/[name of key].pem root@[public DNS]</code></p>
<p>That will get you logged in. You will need to go to /home/[webuser] to checkout your web project from SVN. But first you need to install SVN:</p>
<p><code>yum -y install subversion</code></p>
<p>Now you can check out:</p>
<p><code>svn checkout http://address.of.your.repository/and/path projectname</code></p>
<p>cd in to config and nano the database.yml, make the needed changes, then nano the environment.rb and edit the rails version if needed. Then make the database:</p>
<p><code>mysql</code></p>
<p><code>create database [whatever]</code></p>
<p><code>exit</code></p>
<p>Then cd into the root of the new project you just checked out:<br />
<code><br />
rake db:migrate</code></p>
<p>And if you have fixtures to test with</p>
<p><code>rake db:fixtures:load</code></p>
<p>Amazon runs mogrel so to test your project you can add this shell script:</p>
<p><code>#!/bin/sh<br />
cd /home/webuser/[project name]/log &amp;&amp; rm mongrel.pid -f<br />
pkill -9 mongrel_rails -u root<br />
cd /home/webuser/[project name] &amp;&amp; /usr/bin/mongrel_rails start -e development -p 80 -d</code></p>
<p>chmod that to 755 and run ./restart.sh</p>
<p>Go to the public DNS address in your browser and you should see your project.</p>
<p>Next, I will be attempting to run Rails through Apache on AWS with passenger instead of mongrel. For now this got my project online.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wyliethomas.com/blog/2009/09/15/hosting-on-aws/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

