<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jamie Murai</title>
	
	<link>http://jamiemurai.com</link>
	<description>is a student, developer, and sometimes blogger.</description>
	<pubDate>Sun, 21 Jun 2009 13:38:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/jamiemurai" type="application/rss+xml" /><item>
		<title>Hello iPhone!</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/hBPjNm8FfXo/</link>
		<comments>http://jamiemurai.com/2009/06/hello-iphone/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 13:38:39 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=224</guid>
		<description><![CDATA[When the iPhone was first revealed in January 2007, I was pretty sure that the mobile phone industry was about to be turned on its head. Sure, all the established players said that a new entrant wouldn&#8217;t be able to make any significant headway into an market that was already pretty saturated. Fast forward 2 [...]]]></description>
			<content:encoded><![CDATA[<p>When the iPhone was first revealed in January 2007, I was pretty sure that the mobile phone industry was about to be turned on its head. Sure, all the established players said that a new entrant wouldn&#8217;t be able to make any significant headway into an market that was already pretty saturated. Fast forward 2 and half years later, and the iPhone is arguably the most coveted phone in history, and I&#8217;m happy to say that I&#8217;m finally the proud owner of a &#8220;Jesus Phone&#8221;. On Friday June 19th, I was the first one in line at the Rogers store in Waterloo to buy a new iPhone 3GS. Needless to say, I couldn&#8217;t be happier. I&#8217;ll write up some more thoughts about the phone once I&#8217;ve had more time to play with it.</p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/hBPjNm8FfXo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/06/hello-iphone/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/06/hello-iphone/</feedburner:origLink></item>
		<item>
		<title>Smart Choice</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/YtjiOSPiIGI/</link>
		<comments>http://jamiemurai.com/2009/04/smart-choice/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 02:49:49 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Comedy]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=213</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://jamiemurai.com/wp-content/media/physics_test.jpg"><img alt="" src="http://jamiemurai.com/wp-content/media/physics_test.jpg" title="Physics Test" class="alignnone" width="500" height="300" /></a></p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/YtjiOSPiIGI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/04/smart-choice/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/04/smart-choice/</feedburner:origLink></item>
		<item>
		<title>Wearable Tech From MIT</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/Wv0-nCr1smk/</link>
		<comments>http://jamiemurai.com/2009/03/wearable-tech-from-mit/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 02:33:09 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=209</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object width="446" height="326"><param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"></param><param name="allowFullScreen" value="true" /><param name="wmode" value="transparent"></param><param name="bgColor" value="#ffffff"></param><param name="flashvars" value="vu=http://video.ted.com/talks/embed/PattieMaes_2009-embed_high.flv&#038;su=http://images.ted.com/images/ted/tedindex/embed-posters/PattieMaes-2009.embed_thumbnail.jpg&#038;vw=432&#038;vh=240&#038;ap=0&#038;ti=481" /><embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="446" height="326" allowFullScreen="true" flashvars="vu=http://video.ted.com/talks/embed/PattieMaes_2009-embed_high.flv&#038;su=http://images.ted.com/images/ted/tedindex/embed-posters/PattieMaes-2009.embed_thumbnail.jpg&#038;vw=432&#038;vh=240&#038;ap=0&#038;ti=481"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/Wv0-nCr1smk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/03/wearable-tech-from-mit/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/03/wearable-tech-from-mit/</feedburner:origLink></item>
		<item>
		<title>7 Useful Wordpress Plugins</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/TrfhD2atK18/</link>
		<comments>http://jamiemurai.com/2009/03/7-useful-wordpress-plugins/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 01:05:45 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=194</guid>
		<description><![CDATA[I just got finished installing a couple new WP plugins, so I thought I would write up a little list of the plugins that I use on my blog. My site is fairly simple, so most of the plugins I use do their work in the background, but are very useful nonetheless.

AkismetProbably the best method [...]]]></description>
			<content:encoded><![CDATA[<p>I just got finished installing a couple new WP plugins, so I thought I would write up a little list of the plugins that I use on my blog. My site is fairly simple, so most of the plugins I use do their work in the background, but are very useful nonetheless.</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/akismet/"><strong>Akismet</strong></a><br/>Probably the best method in existence for filtering out spam comments. I wouldn&#8217;t dare run a blog without it unless I wanted to spend hours a day deleting spam (except in certain situations: see #2).</li>
<li><a href="http://wordpress.org/extend/plugins/disqus-comment-system/"><strong>Disqus</strong></a><br/>Replaces the built-in WP comment system with an externally hosted solution. Does a good job of filtering spam, and add a lot of functionality to comments that the stock WP install doesn&#8217;t possess.</li>
<li><a href="http://www.google.com/support/feedburner/bin/answer.py?hl=en&#038;answer=78483"><strong>Feedsmith</strong></a><br/>Redirects all your RSS feeds links to your Feedburner feeds. Really good if you want to keep track of how many subscribers you have, and use the other added functionality offered by Feedburner.</li>
<li><a href="http://wordpress.org/extend/plugins/no-self-ping/"><strong>No Self Pings</strong></a><br/>Stops new posts from pinging other posts on your site. Pretty self-explanatory.</li>
<li><a href="http://wordpress.org/extend/plugins/wp-db-backup/"><strong>Wordpress Database Backup</strong></a><br/>Makes it really easy to backup your WP content. You can choose to store the backup on your server, have it mailed to you, or download it directly. It can also schedule automated backups that will be mailed to you.</li>
<li><a href="http://wordpress.org/extend/plugins/wp-syntax/"><strong>WP-Syntax</strong></a><br/>Enables some pretty slick code highlighting for your blog posts. Check out <a href="http://jamiemurai.com/2009/02/syntax-highlighting-in-wordpress/">this pos</a>t for an example.</li>
<li><a href="http://wordpress.org/extend/plugins/wptouch/"><strong>WPtouch</strong></a><br/>A nice little plugin that modifies the layout of your site when being viewed on an iPhone/iPod Touch.</li>
</ul>
<p>There you have it, the 7 plugins that help me manage this site more effectively.</p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/TrfhD2atK18" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/03/7-useful-wordpress-plugins/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/03/7-useful-wordpress-plugins/</feedburner:origLink></item>
		<item>
		<title>Forever’s Not So Long</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/faqDBtD3czo/</link>
		<comments>http://jamiemurai.com/2009/03/forevers-not-so-long/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 17:31:29 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Movies]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=190</guid>
		<description><![CDATA[
A really great short film by Garrett Murray and Shawn Morrison. Head over to Vimeo to watch it in HD.
]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="281"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3568757&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3568757&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="281"></embed></object></p>
<p>A really great short film by <a href="http://log.maniacalrage.net">Garrett Murray</a> and <a href="http://log.morrisonfilm.com/">Shawn Morrison</a>. Head over to Vimeo to <a href="http://vimeo.com/3568757">watch it in HD</a>.</p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/faqDBtD3czo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/03/forevers-not-so-long/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/03/forevers-not-so-long/</feedburner:origLink></item>
		<item>
		<title>Ruby Deployment Made Easy</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/1_CX98jhbbA/</link>
		<comments>http://jamiemurai.com/2009/03/ruby-deployment-made-easy/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 02:36:57 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=179</guid>
		<description><![CDATA[Adam Wiggins, co-founder of Heroku, posted about the latest version of their Ruby hosting service. 
The new Heroku is instant Ruby deployment with a pure Git workflow. In my estimation, there is no faster or easier way to get a Ruby web app online. We’re finally making good on our tagline: “Never think about servers [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://adam.blog.heroku.com/past/2009/3/9/instant_ruby_deployment/">Adam Wiggins</a>, co-founder of <a href="http://heroku.com/">Heroku</a>, posted about the latest version of their Ruby hosting service. </p>
<blockquote><p>The new Heroku is instant Ruby deployment with a pure Git workflow. In my estimation, there is no faster or easier way to get a Ruby web app online. We’re finally making good on our tagline: “Never think about servers or hosting again.”</p></blockquote>
<p>Having never used Heroku, his post gave me enough incentive to try it out. I can now say that Adam speaks the truth about how easy it is to deploy onto Heroku. If you have a pre-existing Ruby app that&#8217;s already under version control in a Git repository, in the most basic case it takes literally three commands to deploy the app and have it up and running. Check out the <a href="http://heroku.com/pages/quickstart">quick start guide</a> for details. If you are new to Ruby web app deployment, or looking for an easier solution for small apps, definitely take a look at Heroku.</p>
<p><em>*Note:</em> I said Ruby, and not Rails, because Heroku can handle many other Ruby frameworks as well, such as <a href="http://www.merbivore.com/">Merb</a> and <a href="http://www.sinatrarb.com/">Sinatra</a>.</p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/1_CX98jhbbA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/03/ruby-deployment-made-easy/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/03/ruby-deployment-made-easy/</feedburner:origLink></item>
		<item>
		<title>A Few Computer Science Related Blogs</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/1cbiQJxRDdg/</link>
		<comments>http://jamiemurai.com/2009/03/a-few-computer-science-related-blogs/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 09:00:02 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=160</guid>
		<description><![CDATA[Just thought I would post some links to a few blogs that I think have some really good CS related information on them.

Gustavo Duarte
good coders code, great reuse
CompSci.ca
Hacker News

While Hacker News isn&#8217;t strictly a blog, it has an unusually high density of useful technology related information compared to Digg, Reddit, etc.
]]></description>
			<content:encoded><![CDATA[<p>Just thought I would post some links to a few blogs that I think have some really good CS related information on them.</p>
<ul>
<li><a href="http://duartes.org/gustavo/blog/">Gustavo Duarte</a></li>
<li><a href="http://www.catonmat.net/">good coders code, great reuse</a></li>
<li><a href="http://compsci.ca/blog/">CompSci.ca</a></li>
<li><a href="http://news.ycombinator.com/">Hacker News</a></li>
</ul>
<p>While Hacker News isn&#8217;t strictly a blog, it has an unusually high density of useful technology related information compared to Digg, Reddit, etc.</p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/1cbiQJxRDdg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/03/a-few-computer-science-related-blogs/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/03/a-few-computer-science-related-blogs/</feedburner:origLink></item>
		<item>
		<title>Automated Deployment with Fabric</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/VmP-9WGISw4/</link>
		<comments>http://jamiemurai.com/2009/03/automated-deployment-with-fabric/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 02:34:16 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=152</guid>
		<description><![CDATA[You may not know this about me, but I have a slight obsession with software automation tools. I&#8217;ve used make, Ant, and Rake for automating my builds and tests. I&#8217;ve used Capistrano for deploying Rails apps. I even wrote a bash script (with the help of a good friend) to automate the testing of my [...]]]></description>
			<content:encoded><![CDATA[<p>You may not know this about me, but I have a slight obsession with software automation tools. I&#8217;ve used <a href="http://en.wikipedia.org/wiki/Make_(software)">make</a>, <a href="http://en.wikipedia.org/wiki/Apache_Ant">Ant</a>, and <a href="http://en.wikipedia.org/wiki/Rake_(software)">Rake</a> for automating my builds and tests. I&#8217;ve used <a href="http://en.wikipedia.org/wiki/Capistrano">Capistrano</a> for deploying Rails apps. I even wrote a bash script (with the help of a good friend) to automate the testing of my school programming assignments. With that in mind, I wanted to post a few thoughts on my newest automation find. It&#8217;s called <a href="http://www.nongnu.org/fab/">Fabric</a>, and it&#8217;s an automated deployment tool written in Python.</p>
<p>Fabric is similar to Capistrano, but I find it to be a little more lightweight and much easier to get up and running quickly. I tried to install it on my Macbook Pro using the Python &#8216;easy_install&#8217; tool, but I think there was some type of dependancy problem, so I ended up installing it through <a href="http://en.wikipedia.org/wiki/MacPorts">MacPorts</a>. Once it&#8217;s installed, all you need to do is create a file called &#8216;fabfile&#8217; in the root of your project directory, and add the necessary tasks. In Fabric, each task is just a plain old Python function. Let&#8217;s say you build your application into a &#8216;dist&#8217; directory. Here&#8217;s an example of a simple fabfile that will archive the dist directory, copy it to the production server, and extract it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> production<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
  config.<span style="color: black;">fab_hosts</span> = <span style="color: black;">&#91;</span><span style="color: #483d8b;">'myserver.com'</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> deploy<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
  <span style="color: #483d8b;">'Deploys the project to the remote hosts'</span>
  require<span style="color: black;">&#40;</span><span style="color: #483d8b;">'fab_hosts'</span>, provided_by = <span style="color: black;">&#91;</span>production<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
  local<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;tar cvf project.tar dist')
  put(&quot;</span>/remote/path/to/project.<span style="color: black;">tar</span><span style="color: #483d8b;">&quot;, &quot;</span>project.<span style="color: black;">tar</span><span style="color: #483d8b;">&quot;)
  run(&quot;</span>tar xvf project.<span style="color: black;">tar</span><span style="color: #483d8b;">&quot;)</span></pre></td></tr></table></div>

<p>As you can probably guess, local() will run a command on your local machine, put() will copy a file over to your remote machine, and run() will run a command on your remote machine. There is also a sudo() function, which will run a command under sudo privileges on your remote machine. The production() function just tells Fabric which servers to run the deploy commands on. The config.fab_hosts variable is an array, so feel free to add as many hosts as you like. If you wish to setup multiple environments, then just add a different function for each (i.e. test(), staging(), production() ), and then add the extra environments to the &#8216;provided_by&#8217; variable on line 6. Finally, deploy your project with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ fab deploy</pre></div></div>

<p>So as you can see, it&#8217;s very easy to get started with Fabric. I haven&#8217;t had a ton of experience with Capistrano, but I can tell you that it took me quite a bit longer to get a handle on Capistrano than it did with Fabric, but YMMV. I just think it&#8217;s a cool little tool that would be really useful for a wide variety of deployment situations.</p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/VmP-9WGISw4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/03/automated-deployment-with-fabric/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/03/automated-deployment-with-fabric/</feedburner:origLink></item>
		<item>
		<title>Her Morning Elegance</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/ceu-QaU-Ec0/</link>
		<comments>http://jamiemurai.com/2009/02/her-morning-elegance/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:52:53 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=144</guid>
		<description><![CDATA[
by Oren Lavie
]]></description>
			<content:encoded><![CDATA[<div><object width="500" height="404"><param name="movie" value="http://www.dailymotion.com/swf/x84l2p" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://www.dailymotion.com/swf/x84l2p" type="application/x-shockwave-flash" width="500" height="404" allowFullScreen="true" allowScriptAccess="always"></embed></object></p>
<p><em>by</em> <a href="http://www.orenlavie.com/">Oren Lavie</a></div>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/ceu-QaU-Ec0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/02/her-morning-elegance/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/02/her-morning-elegance/</feedburner:origLink></item>
		<item>
		<title>Protect Wordpress Admin With SSL</title>
		<link>http://feedproxy.google.com/~r/jamiemurai/~3/F89DkRzddxo/</link>
		<comments>http://jamiemurai.com/2009/02/protect-wordpress-admin-with-ssl/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 05:56:53 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
		
		<category><![CDATA[Howto]]></category>

		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jamiemurai.com/?p=131</guid>
		<description><![CDATA[If you ever login to your Wordpress admin section while on a public network, you probably want to encrypt your login information with SSL so that unscrupulous people don&#8217;t start posting naked pictures of themselves on your blog. Ok, so that might be a stretch, but I still think it&#8217;s a good idea to protect [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever login to your Wordpress admin section while on a public network, you probably want to encrypt your login information with SSL so that unscrupulous people don&#8217;t start posting naked pictures of themselves on your blog. Ok, so that might be a stretch, but I still think it&#8217;s a good idea to protect your login information.<span id="more-131"></span></p>
<p>These instructions assume that you&#8217;re running Ubuntu 8.10 with Apache 2, and the latest version of Wordpress (2.7 at the time of this writing).  Let&#8217;s start off by creating our self-signed SSL certificate. Remember that when using a self-signed certificate, your browser will throw up a warning, but your traffic will still be encrypted and safe from prying eyes. To generate a self-signed certicate, run the following command, and when prompted, specify the full domain name that you want to protect (i.e. yoursite.com).</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /path/to/your/cert/mycert.pem</pre></div></div>

<p>Set the <em>/path/to/your/cert</em> to wherever your want to store your self-signed certificate. Now we need to go ahead and activate the mod_ssl module and restart Apache.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ sudo a2enmod ssl
$ sudo /etc/init.d/apache2 restart</pre></div></div>

<p>Next up, we need to configure Apache to listen on port 443 (the standard SSL port) alongside the default port 80. We need to edit a couple files to do this. First, edit <em>/etc/apache2/ports.conf</em> to contain the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">Listen 80
&nbsp;
&lt;IfModule mod_ssl.c&gt;
    Listen 443
&lt;/IfModule&gt;</pre></td></tr></table></div>

<p>Next, edit <em>/etc/apache2/apache2.conf</em>, and add the following if it doesn&#8217;t already exist.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">NameVirtualHost *:80
&nbsp;
&lt;IfModule mod_ssl.c&gt;
    NameVirtualHost *:443
&lt;/IfModule&gt;</pre></td></tr></table></div>

<p>Lastly, we just need to enable SSL for the virtual host under which Wordpress is running. The easiest way to do it is to just copy the existing virtual host definition, change the port number, and add the lines to activate the SSL. This is done inside the virtual host definition file for your blog, most likely <em>/etc/apache2/sites-available/yoursite.com</em> or something similar.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">&lt;VirtualHost *:443&gt;
  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin admin@example.com
  ServerName  yoursite.com
  ServerAlias www.yoursite.com
&nbsp;
  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.php
  DocumentRoot /path/to/your/wordpress/install
&nbsp;
  RewriteEngine On
  RewriteRule !^/wp-admin/(.*) - [C]
  RewriteRule !^/wp-login.php(.*) - [C]
  RewriteRule ^/(.*) http://yoursite.com/$1 [QSA,L]
&nbsp;
  # Custom log file locations
  LogLevel warn
  ErrorLog  /path/to/your/logs/error.log
  CustomLog /path/to/your/logs/access.log combined
&nbsp;
  SSLEngine on
  SSLCertificateFile /path/to/your/cert/mycert.pem
&lt;/VirtualHost&gt;</pre></td></tr></table></div>

<p>Keep in mind that you still need the virtual host definition for the one running on port 80. This means that the 1 file should have definitions for 2 virtual hosts. Lines 11-14 just ensure that any https traffic directed at anything but the admin section is redirected to standard http. This isn&#8217;t necessarily required, I just personally prefer that only the admin section uses SSL.</p>
<p>All that&#8217;s left is to tell Wordpress that we want to use SSL for the admin section. This can be accomplished by adding a single line to your <em>wp-config.php</em> file. That is the same file where you defined your database connection info.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">define('FORCE_SSL_ADMIN', true);</pre></td></tr></table></div>

<p>If you wish, instead, to only use SSL for the login, then you would replace the line above with the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">define('FORCE_SSL_LOGIN', true);</pre></td></tr></table></div>

<p>Restart Apache one more time, and everything should be working properly. From now on, when you visit any admin page, you will automatically be redirected to the https version. This will ensure that no one is able to intercept your login information and fill your blog with pictures of <a href="http://en.wikipedia.org/wiki/Lolcat">lolcats</a>.</p>
<img src="http://feeds.feedburner.com/~r/jamiemurai/~4/F89DkRzddxo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jamiemurai.com/2009/02/protect-wordpress-admin-with-ssl/feed/</wfw:commentRss>
		<feedburner:origLink>http://jamiemurai.com/2009/02/protect-wordpress-admin-with-ssl/</feedburner:origLink></item>
	</channel>
</rss>
