<?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>prupert &#187; Set up a blog</title>
	<atom:link href="http://www.prupert.co.uk/category/how-to/set-up-a-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.prupert.co.uk</link>
	<description>putting the know back in technology</description>
	<lastBuildDate>Sat, 04 Feb 2012 14:58:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Server Migration Complete</title>
		<link>http://www.prupert.co.uk/2010/02/11/server-migration-complete/</link>
		<comments>http://www.prupert.co.uk/2010/02/11/server-migration-complete/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 13:19:25 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Set up a blog]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=267</guid>
		<description><![CDATA[So, I am now hosting this site with JustHost.com as I got tired stressing about keeping my own server up and running and not being able to upgrade it and mess with it in case I mess anything up. Hopefully things will now be more reliable and I shall see if I can add any [...]]]></description>
			<content:encoded><![CDATA[<p>So, I am now hosting this site with JustHost.com as I got tired stressing about keeping my own server up and running and not being able to upgrade it and mess with it in case I mess anything up.</p>
<p>Hopefully things will now be more reliable and I shall see if I can add any more services.</p>
<p>If you want to use JustHost.com&#8217;s services, click the small advert below and I&#8217;ll earn $60 apparently!</p>
<p><a href="http://stats.justhost.com/track?c9c43e20028ab8b14a32cc61bd65202f2"><img src="http://affiliates.justhost.com/control/img/banners/justhost_UK120x60.gif" /></a></p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=267" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/02/11/server-migration-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up virtual hosts with Apache</title>
		<link>http://www.prupert.co.uk/2008/11/11/setting-up-virtual-hosts-with-apache/</link>
		<comments>http://www.prupert.co.uk/2008/11/11/setting-up-virtual-hosts-with-apache/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 22:58:16 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Set up a blog]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=80</guid>
		<description><![CDATA[Thought I should post about setting up virtual hosts in Apache, since this was one of the first things I had to do. I got all this info from this site, which was incredibly useful. For all the following instructions, when you see these instructions: enter some/text/here You need to enter this text exactly as [...]]]></description>
			<content:encoded><![CDATA[<p>Thought I should post about setting up virtual hosts in Apache, since this was one of the first things I had to do. I got all this info from <a title="this site" href="http://www.debian-administration.org/articles/412">this site</a>, which was incredibly useful. For all the following instructions, when you see these instructions:</p>
<pre>enter some/text/here</pre>
<p>You need to enter this text exactly as you see it in your terminal, which can be found at Applications&gt;Accessories&gt;Terminal</p>
<p>First, you need to set up your folders where the sites are gonna be stored:</p>
<pre>mkdir /home/www/www.example.com
mkdir /home/www/www.example.net</pre>
<p>Then you need to tell Apache that you are gonna use virtual hosts. Create a file using:</p>
<p><tt>sudo touch /etc/apache2/conf.d/virtual.conf</tt></p>
<p>You need to add the following content, use:</p>
<p><tt>sudo gedit /etc/apache2/conf.d/virtual.conf</tt></p>
<p>and enter the following:</p>
<pre>#
#  We're running multiple virtual hosts.
#</pre>
<pre>NameVirtualHost *</pre>
<p>Now, you have to create an entry in both the sites-enabled and sites-available directories in /etc/apache2. So, first create the following file:</p>
<p><tt>sudo touch /etc/apache2/sites-available/www.example.com</tt></p>
<p>and enter the following by using:</p>
<p><tt>sudo gedit /etc/apache2/sites-available/www.example.com</tt></p>
<p>and enter:</p>
<pre>#
#  Example.com (/etc/apache2/sites-available/www.example.com)
#
&lt;VirtualHost *&gt;
        ServerAdmin webmaster@example.com
        ServerName  www.example.com
        ServerAlias example.com

        # Indexes + Directory Root.
        DirectoryIndex index.html
        DocumentRoot /home/www/www.example.com/htdocs/

        # CGI Directory
        ScriptAlias /cgi-bin/ /home/www/www.example.com/cgi-bin/
        &lt;Location /cgi-bin&gt;
                Options +ExecCGI
        &lt;/Location&gt;

        # Logfiles
        ErrorLog  /home/www/www.example.com/logs/error.log
        CustomLog /home/www/www.example.com/logs/access.log combined
&lt;/VirtualHost&gt;</pre>
<p>Next, do the same for your second site, so create a file using:</p>
<p><tt>sudo touch /etc/apache2/sites-available/www.example.net</tt></p>
<p>and enter the following by using:</p>
<p><tt>sudo gedit /etc/apache2/sites-available/www.example.net</tt></p>
<p>and enter:</p>
<pre>#
#  Example.net (/etc/apache2/sites-available/www.example.net)
#
&lt;VirtualHost *&gt;
        ServerAdmin webmaster@example.net
        ServerName  www.example.net
        ServerAlias example.net

        # Indexes + Directory Root.
        DirectoryIndex index.html
        DocumentRoot /home/www/www.example.net/htdocs/

        # CGI Directory
        ScriptAlias /cgi-bin/ /home/www/www.example.net/cgi-bin/
        &lt;Location /cgi-bin&gt;
                Options +ExecCGI
        &lt;/Location&gt;

        # Logfiles
        ErrorLog  /home/www/www.example.net/logs/error.log
        CustomLog /home/www/www.example.net/logs/access.log combined
&lt;/VirtualHost&gt;</pre>
<p>Finally, you need to create a copy of these files in the sites-enabled directory, using what is called a symbolic link. You can use a funky little program called a2ensite to do this. So, enter the following:</p>
<pre>sudo a2ensite www.example.com
sudo a2ensite www.example.net</pre>
<p>And finally (I was lying last time), you need to restart Apache for this to all take effect:</p>
<pre>sudo /etc/init.d/apache2 reload</pre>
<p>And tada, it should all be working, yay!</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=80" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2008/11/11/setting-up-virtual-hosts-with-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up WordPress</title>
		<link>http://www.prupert.co.uk/2008/11/11/setting-up-wordpress/</link>
		<comments>http://www.prupert.co.uk/2008/11/11/setting-up-wordpress/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 19:47:47 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Set up a blog]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=75</guid>
		<description><![CDATA[Formatting and Structure One interesting thing I just noticed. When you write a page, and presumably a post, and WordPress creates a permalink for you, make sure you know what you want to call it, and don&#8217;t change it. It seems that wordpress uses the first title you choose as the permalink title. Even if [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Formatting and Structure</strong></p>
<p>One interesting thing I just noticed. When you write a page, and presumably a post, and WordPress creates a permalink for you, make sure you know what you want to call it, and don&#8217;t change it. It seems that wordpress uses the first title you choose as the permalink title. Even if you change the title later, it uses the original title as the permalink. Something to bear in mind when you get home late, drunk, and decide to write a rant about curbs and giving it a less than gregarious title&#8230;Ooh, I&#8217;ve just noticed you can edit it, in the permalink option beneath your page title..very cool.</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=75" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2008/11/11/setting-up-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Apache</title>
		<link>http://www.prupert.co.uk/2008/11/11/setting-up-apache/</link>
		<comments>http://www.prupert.co.uk/2008/11/11/setting-up-apache/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 19:44:22 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Set up a blog]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=73</guid>
		<description><![CDATA[mod_rewrite After getting Apache up and running in Ubuntu, I needed to make sure it was all configured for WordPress. Everything was ok, excpet for mod_rewrite, which I apparently needed to enable. After some googling googling, I realised I needed to do this: First, I needed to add the rewrite.load to /etc/apache2/mods-enabled/ So, open a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>mod_rewrite</strong></p>
<p>After getting Apache up and running in Ubuntu, I needed to make sure it was all configured for WordPress. Everything was ok, excpet for mod_rewrite, which I apparently needed to enable. After some googling <a href="http://ubuntuforums.org/showthread.php?t=7304">googling</a>, I realised I needed to do this:</p>
<p>First, I needed to add the rewrite.load to /etc/apache2/mods-enabled/<br />
So, open a terminal window and type:<br />
<code>sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/</code></p>
<p>Second, edit the apache configuration for my virtualhosting. For example, in my computer I only have one virtual hosting (/var/www) that is default from installation, so I make some adjustment for that (In my case I have to edit this file /etc/apache2/sites-enabled/000-default)<br />
Again in terminal type (this loads a text editor with the correct permission allowing you to edit the file:<br />
<code>sudo vi /etc/apache2/sites-enabled/000-default</code><br />
Change the Allowoverride value to all for the document root directory<br />
For example, I made change to this part of the configuration:</p>
<p><code> /var/www/<br />
Options Indexes FollowSymLinks MultiViews<br />
AllowOverride all<br />
Order allow,deny<br />
allow from all<br />
# This directive allows us to have apache2's default start page<br />
# in /apache2-default/, but still have / go to the right place<br />
# Commented out for Ubuntu<br />
#RedirectMatch ^/$ /apache2-default/<br />
</code></p>
<p>Finnaly, just restart the apache, so, again in terminal type:<br />
<code>sudo /etc/init.d/apache2 restart</code></p>
<p><strong>.htaccess</strong></p>
<p>I wanted to get WordPress to use nice page structures, rather than all that silly ?&gt;443634 stuff. So, in settings in WordPress, I chose the permalink option and decided on the day,date,name option. However, for this to work, as wordpress warned me, I needed to allow wordpress to write to my .htaccess file.</p>
<p>The <a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html">.htaccess</a> is a file that can be used to do a lot to change the way your site works, it can be used to add security to your site (all though this isn&#8217;t always the best way). It turns out that my site didn&#8217;t have a .htaccess file, so I had to create one, this was as simple as creating an empty file in the root of my websites directoy and calling it, yes, you guessed it: .htaccess.</p>
<p>I then had ensure wordpress can write to this file. I did this temporarly (by typing <code>sudo nautilus</code> into terminal, which opens a file explorer, but as the super user, so you can do what you want (carefull, you can kill your system if you delete a file that is needed) and navigating to the root of my website directory and right clicking on the .htaccess file I created and choosing the permissions tab and changing the option so everyone can read/write the file and click OK). I then chose the correct option in wordpress via the admin interface to make fancy URLs. WordPress now no longer moans about not be able to write to the .htaccess file. Now, I go back to the .htaccess file in nautilus, right click it again and chase the permission for everyone back to read only. Ta da &#8211; fancy URLS and some security to boot.</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=73" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2008/11/11/setting-up-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

