<?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>Johnvh.com - online home of John Van Horn &#187; Wordpress</title>
	<atom:link href="http://johnvh.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://johnvh.com</link>
	<description>Online home of Dallas, TX based web developer John Van Horn</description>
	<lastBuildDate>Fri, 13 Nov 2009 05:42:05 +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>Wordpress, mod rewrite, and htaccess nightmare</title>
		<link>http://johnvh.com/2009/02/17/wordpress-mod-rewrite-and-htaccess-nightmare/</link>
		<comments>http://johnvh.com/2009/02/17/wordpress-mod-rewrite-and-htaccess-nightmare/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 05:08:40 +0000</pubDate>
		<dc:creator>johnvh</dc:creator>
				<category><![CDATA[Web stuff]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://johnvh.com/?p=157</guid>
		<description><![CDATA[So I recently blogged about using digest authentication instead of basic for securing your wp-admin directory. When implementing this myself, I had it all set up and working on a subdomain. But, I had the authentication directive in the root .htaccess file as well as the wp-admin/.htaccess file. This made it appear to work just [...]]]></description>
			<content:encoded><![CDATA[<p>So I <a href="http://johnvh.com/2009/02/11/use-digest-authentication/">recently blogged</a> about using digest authentication instead of basic for securing your wp-admin directory. When implementing this myself, I had it all set up and working on a subdomain. But, I had the authentication directive in the root <code>.htaccess</code> file as well as the <code>wp-admin/.htaccess</code> file. This made it appear to work just fine. When I went to implement this on here on my live site though, I ran into an issue. The rewrite was being applied no matter what! This resulted in requests to /wp-admin being rewrriten and handled by index.php, and 404'ing.</p>
<p>So save yourself some headaches and searching, and put the following in your root <code>.htaccess</code> file:</p>
<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showPlainTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ErrorDocument <span style="color:#800000;color:#800000;">401</span> /error.<span style="">html</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ErrorDocument <span style="color:#800000;color:#800000;">403</span> /error.<span style="">html</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Just make sure those files (error.html) actually exist.</p>
<p>I don't exactly know why this works, but it does. I also don't know who is to blame. <a href="http://textpattern.com/faq/173/password-protected-directories-with-htaccess">Textpattern blames Apache configurations</a> for not having valid error documents to serve (they also have the solution). <a href="http://wiki.dreamhost.com/index.php/Making_stats_accessible_with_htaccess">Dreamhost blames overly aggressive rewrite conditions,</a> but I don't know about that either. Seems to me the rewrite conditions are being used correctly. Sure, the requested uri needs authentication, <strong>but it exists on disk.</strong> Props to <a href="http://www.ju-ju.com/2006/03/17/wordpress-404-error">other</a> <a href="http://developedtraffic.com/2007/05/27/wordpress-admin-password-protection-404/">folks</a> too for other ideas, and the final solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnvh.com/2009/02/17/wordpress-mod-rewrite-and-htaccess-nightmare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use digest authentication</title>
		<link>http://johnvh.com/2009/02/11/use-digest-authentication/</link>
		<comments>http://johnvh.com/2009/02/11/use-digest-authentication/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 03:08:18 +0000</pubDate>
		<dc:creator>johnvh</dc:creator>
				<category><![CDATA[Web stuff]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://johnvh.com/?p=153</guid>
		<description><![CDATA[I've seen several articles that discuss Wordpress security - just search for it - say that you should password protect the wp-admin directory. You can do this easily with Apache by using authentication directives, which allow you, per directory, to require a valid user name and password from a client before serving up any content. [...]]]></description>
			<content:encoded><![CDATA[<p>I've seen several articles that discuss Wordpress security - just <a href="http://www.google.com/search?&#038;q=wordpress%20security">search for it</a> - say that you should password protect the wp-admin directory. You can do this easily with Apache by using <a href="http://httpd.apache.org/docs/2.0/howto/auth.html">authentication directives,</a> which allow you, per directory, to require a valid user name and password from a client before serving up any content. As of right now, there are two types of authentication that are prevalent out of the box: <a href="http://en.wikipedia.org/wiki/Basic_authentication">basic authentication,</a> and <a href="http://en.wikipedia.org/wiki/Digest_authentication">digest autentication.</a></p>
<p>All the security articles I've read recommend setting up basic authentication. I understand that the <em>point</em> is to have password protected access, but basic authentication is <em>not</em> secure. When your browser is challenged with the basic authorization protocol, the user name and password you enter is just <a href="http://en.wikipedia.org/wiki/Base64">base 64 encoded.</a> If someone intercepted a request header on the way to your server after you've authenticated, there would be <a href="http://www.google.com/search?hl=en&#038;q=base64%20decode">virtually no work at all</a> involved in decoding your user name and password.</p>
<p>Alternatively, and just as easily, you can use <a href="http://en.wikipedia.org/wiki/Digest_authentication">digest authentication</a>, which is considered to be much more secure than basic. It uses <a href="http://en.wikipedia.org/wiki/MD5">MD5 encryption</a>, and other techniques to make the output nearly <a href="http://en.wikipedia.org/wiki/One_way_function">one way.</a></p>
<p>Consider the following exceprts from a <code>.htaccess</code> file:</p>
<div class="igBar"><span id="lcode-5"><a href="#" onclick="javascript:showPlainTxt('code-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-5">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#Use digest authentication</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AuthType Digest </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AuthName <span style="color:#CC0000;">"private"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AuthDigestFile /home/yourusername/.<span style="">htdigest</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Require valid-user </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showPlainTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#Use basic authentication</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AuthUserFile /home/yourusername/.<span style="">htpasswd</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AuthName <span style="color:#CC0000;">"restricted"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AuthType Basic</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Require valid-user </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Both should be fairly easy to setup with the Auth directives, and Apache ships with CLI tools for easily adding users and password files: <code>htpasswd</code>, and <code>htdigest</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnvh.com/2009/02/11/use-digest-authentication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
