<?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>Jumping Through Hoops &#187; Apache</title>
	<atom:link href="http://blog.jameshiggs.com/tags/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jameshiggs.com</link>
	<description>James Higgs&#039;s Blog</description>
	<lastBuildDate>Wed, 03 Feb 2010 14:16:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting WordPress, mod_rewrite and Leopard to work together</title>
		<link>http://blog.jameshiggs.com/2007/12/25/getting-wordpress-mod_rewrite-and-leopard-to-work-together/</link>
		<comments>http://blog.jameshiggs.com/2007/12/25/getting-wordpress-mod_rewrite-and-leopard-to-work-together/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 13:28:46 +0000</pubDate>
		<dc:creator>higgis</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.jameshiggs.com/2007/12/25/getting-wordpress-mod_rewrite-and-leopard-to-work-together/</guid>
		<description><![CDATA[I&#8217;ve been trying to get Leopard, Apache 2 and WordPress working together for a while now. I want to use the WordPress friendly URL feature, and this requires the Apache mod_rewrite module to work too. There are various places around the web that have partial solutions to these problems. Here&#8217;s the procedure I followed &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to get Leopard, Apache 2 and WordPress working together for a while now. I want to use the WordPress friendly URL feature, and this requires the Apache mod_rewrite module to work too. There are various places around the web that have partial solutions to these problems. Here&#8217;s the procedure I followed &#8211; YMMV</p>
<p>First off, WordPress is installed in <code>/Users/jameshiggs/Sites/blog</code>. Leopard comes with Apache 2.2 installed, but has PHP disabled by default. To correct this, go to the console and change directory to <code>/etc/apache2</code> and open <code>httpd.conf</code> in your favourite editor. For me this means typing:</p>
<pre>sudo mate httpd.conf</pre>
<p>You&#8217;ll probably have to enter your admin password. Find the line that reads:</p>
<pre>#LoadModule php5_module libexec/apache2/libphp5.so</pre>
<p>and uncomment it so that it looks like this:</p>
<pre>LoadModule php5_module libexec/apache2/libphp5.so</pre>
<p>Next, we need to make sure that your user directory allows <code>.htaccess</code> rules. To do this, create a file called <code>jameshiggs.conf</code> (obviously, you&#8217;ll need to replace my user name with yours) in <code>/etc/apache2/users</code>. The contents of that file should read:</p>
<pre>&lt;Directory "/Users/jameshiggs/Sites"&gt;
	Options Indexes MultiViews
	AllowOverride All
	Order allow,deny
	Allow from all
&lt;/Directory&gt;</pre>
<p>Again, you&#8217;ll need to replace my user name with yours.</p>
<p>The final piece of the jigsaw is to configure WordPress to use friendly URLs &#8211; which you do from the Options &gt; Permalinks page. I&#8217;ve selected the second option which makes URLs look like this: <code>http://localhost/~jameshiggs/blog/2007/12/25/sample-post/</code>. If WordPress can write to the site root then it will automatically create the <code>.htaccess</code> file. If not, you&#8217;ll need to create it yourself in the root of your blog site. On my machine, the file should look like this:</p>
<pre>&lt;IfModule mod_rewrite.c&gt;
	Options +FollowSymLinks
	RewriteEngine On
	RewriteBase /~jameshiggs/blog/
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule . /~jameshiggs/blog/index.php [L]
&lt;/IfModule&gt;</pre>
<p>Finally, you need to restart Apache &#8211; the easiest way to do that is to go to System Preferences &gt; Sharing panel and untick Web Sharing. Once Apache has stopped, tick it again and Apache should start up. And that&#8217;s it.</p>
<p>Let me know if you have any variants to this procedure.</p>
<p>Thanks to <a href="http://www.bagelturf.com/files/a47270927ba7060915782314c984c3a9-1074.html">Bagelturf</a> and <a href="http://danilo.ariadoss.com/2007/12/16/how-to-setup-apache-php-mysql-on-mac-os-x-105-leopard/">Ariadoss</a> for hints that helped me get this running.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jameshiggs.com/2007/12/25/getting-wordpress-mod_rewrite-and-leopard-to-work-together/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
