<?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>FettesPS &#187; virtualhost</title>
	<atom:link href="http://www.fettesps.com/tag/virtualhost/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fettesps.com</link>
	<description>Fettes Programming Solutions</description>
	<lastBuildDate>Sun, 22 Jan 2012 18:21:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ubuntu 9.04 Server &#8211; Custom 404 Pages</title>
		<link>http://www.fettesps.com/ubuntu-810-server-custom-404-pages/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-810-server-custom-404-pages</link>
		<comments>http://www.fettesps.com/ubuntu-810-server-custom-404-pages/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 01:28:28 +0000</pubDate>
		<dc:creator>FettesPS</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualhost]]></category>

		<guid isPermaLink="false">http://www.fettesps.com/blog/?p=54</guid>
		<description><![CDATA[One thing I&#8217;ve always found gave a nice little touch to any web site was to have custom error pages.  Something a little friendlier than a standard 404 error can prevent a user from leaving your website due to frustration and confusion.  They may think the whole domain was down and close the tab and [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I&#8217;ve always found gave a nice little touch to any web site was to have custom error pages.  Something a little friendlier than a standard 404 error can prevent a user from leaving your website due to frustration and confusion.  They may think the whole domain was down and close the tab and proceed to the next <a href="http://www.google.com/" target="_new">Google search result</a>  Why not encourage the visitor to stay by providing them with an easy and efficient way to find what they&#8217;re looking for?</p>
<p>Note: You&#8217;re going to need to know the basics of setting up your own virtual host for Apache 2 to make use of this. If you don&#8217;t know how to do that you could probably find a tutorial on this blog if you try hard enough <img src='http://www.fettesps.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Open up the config file for your virtual host with your favourite text editor:</p>
<p><code>pico /etc/apache/sites-available/mywebsite.com</code></p>
<p>It should look something like this:</p>
<p><code>&lt;VirtualHost *&gt;<br />
DocumentRoot /home/mypage.com/www/<br />
ServerName mypage.com<br />
ServerAlias www.mypage.com<br />
ErrorLog /home/mypage.com/log/<br />
CustomLog /home/mypage.com/log/<br />
&lt;/VirtualHost&gt;</code></p>
<p>Before the closing tag add links to your custom error pages, it should look like this:</p>
<p><code>ErrorDocument 403 /403.php<br />
ErrorDocument 404 /404.php</code></p>
<p>Now save the file, restart apache by typing:</p>
<p><code>/etc/init.d/apache2 restart</code></p>
<p>If you haven&#8217;t created those custom pages yet, do so now or you&#8217;ll end up with a rather funny looking error page that tells you there was a 404 error while trying to find your custom 404 page.  You can make it simple, just the general look and feel of your site with a friendly message of what happened.  Or you can touch it up throw a custom search box that will allow them to find the proper file on your site.  For that I will let Google give you the <a href="http://www.google.com/coop/cse/" target="_new">step-by-step</a>.</p>
<p>For an example of a good 404 page, check out <a href="http://www.niagaraforfree.com/404.php" target="_new">NiagaraForFree&#8217;s</a> custom page.<br />
<br />
<strong>Updated:</strong> March 10, 2009 for Ubuntu 9.04</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fettesps.com/ubuntu-810-server-custom-404-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

