<?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>nolancaudill.com &#187; ubuntu</title>
	<atom:link href="http://nolancaudill.com/index.php/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://nolancaudill.com</link>
	<description>thoughts and whatnot</description>
	<lastBuildDate>Wed, 18 Nov 2009 03:47:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Setting up lighttpd/Apache for Django on Slicehost</title>
		<link>http://nolancaudill.com/index.php/2008/02/10/setting-up-lighttpdapache-for-django-on-slicehost/</link>
		<comments>http://nolancaudill.com/index.php/2008/02/10/setting-up-lighttpdapache-for-django-on-slicehost/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 03:34:14 +0000</pubDate>
		<dc:creator>nolan</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nolancaudill.com/index.php/2008/02/10/setting-up-lighttpdapache-for-django-on-slicehost/</guid>
		<description><![CDATA[I finally made the jump and moved the websites I was hosting on my home PC and moved them out to slicehost. Signing up for my slice could not have been easier and so far it has been a flawless experience. The PickledOnion articles were nice to double-check myself to make sure I didn&#8217;t miss [...]]]></description>
			<content:encoded><![CDATA[<p>I finally made the jump and moved the websites I was hosting on my home PC and moved them out to <a href="http://slicehost.com">slicehost</a>. Signing up for my slice could not have been easier and so far it has been a flawless experience. The PickledOnion articles were nice to double-check myself to make sure I didn&#8217;t miss anything.</p>
<p>I opted for the Ubuntu 7.10 256 MB slice since that was what the sites were priorly hosted on. I decided that I wanted to do things by <a href="http://djangobook.com">the book</a> so I set up a lighttpd server that served my media straight up and funneled all Django requests through Apache/mod_python. I couldn&#8217;t find an exact way to this previously published so I thought I would add a few code snippets to help others looking to do the same.</p>
<p>First off, I got the Apache/mod_python setup working. This was pretty much a cut and paste from the deployment docs found in the Django book. Nothing tricky there. By default, Apache runs on port 80, but that will be changed later on.</p>
<p>The next step was to get lighttpd working properly. The relevant snippet is below:</p>
<pre>
$HTTP["host"] =~ "^(www.)?example.com" {
    $HTTP["url"] !~ "^/(public|media)/" {
        proxy.server = ( "" =&gt;
            ( (
                "host" =&gt; "127.0.0.1",
                "port" =&gt; 81
            ) )
        )
    }
}</pre>
<p>Broken down, this says if we get a request for example.com and the URL does not contain one of our media directories (read: a Django request), proxy it to port 81. This way lighttpd will serve up all the  static files and then redirect the Django stuff to our Apache instance that will be listening on port 81.</p>
<p>After that, change the ports.conf file for your Apache instance to listen on port 81, and the &#8220;server.port&#8221; variable in your lighttpd.conf to listen on port 80, and then restart both servers. If everything went correctly, you should now have a 2 servers doing what they do best and have a happy machine to boot.</p>
<p>I did add a couple of lines to my Apache conf to get better performance.</p>
<p>First off, I turned off KeepAlive as suggested  by <a href="http://www.jacobian.org/writing/2005/dec/12/django-performance-tips/">Jacob Kaplan-Moss</a>. KeepAlive is useful if you are using Apache to serve up several files over one TCP connection, like multiple images on a page load. Since on every page load we are making just one request to Apache (for the HTML itself) and lighttpd is handling all of the static serving (which it is very good at it), KeepAlive helps us none and actually hurts us as Apache will quickly become RAM hungry holding on to your full Django code when there is no need for it.</p>
<p>Second tuning measure was to bump MaxRequestsPerChild up. I set mine at 500 and saw a big RAM usage drop. This way since these are fairly RAM-heavy Apache processes, they&#8217;ll get cleaned up once they reach a certain number.</p>
<p>Overall, I have been very pleased with slicehost and the Django book was very helpful in getting everything up and running.</p>
]]></content:encoded>
			<wfw:commentRss>http://nolancaudill.com/index.php/2008/02/10/setting-up-lighttpdapache-for-django-on-slicehost/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Gutsy Reinstall</title>
		<link>http://nolancaudill.com/index.php/2007/10/19/gutsy-reinstall/</link>
		<comments>http://nolancaudill.com/index.php/2007/10/19/gutsy-reinstall/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 12:46:25 +0000</pubDate>
		<dc:creator>nolan</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nolancaudill.com/index.php/2007/10/19/gutsy-reinstall/</guid>
		<description><![CDATA[Since I had was running a Feisty Fawn that had everything under the sun installed (I get a little apt-get happy at times), including the KDE desktop that installed on top of regular Ubuntu, I felt a full reinstall was in order. After all my backups were checked, I reinstalled. This wasn&#8217;t the easiest install [...]]]></description>
			<content:encoded><![CDATA[<p>Since I had was running a Feisty Fawn that had everything under the sun installed (I get a little apt-get happy at times), including the KDE desktop that installed on top of regular Ubuntu, I felt a full reinstall was in order.</p>
<p>After all my backups were checked, I reinstalled. This wasn&#8217;t the easiest install I&#8217;ve ever done before, but it had nothing to do with Kubuntu directly. I guess everyone was downloading the ISOs as there was quite a bit of publicity of this release, because I would get to the &#8220;Scanning for mirrors&#8230;&#8221; portion of the install and the installer would just lock and a Ctrl+Alt+Del was my only option. </p>
<p>On my third time trying, I just pulled network cable and opted for the manual network configuration later selection and everything finished smoothly. </p>
<p>Trying to get a few of favorite packages was also a test in patience and it would take a couple of minutes just to begin the download and then I would start getting the packages on a 10-20 Kb/s stream. The Ubuntu repositories were absolutely slammed yesterday.</p>
<p>Edit: It appears that the Hemingway is not the culprit and it is something else. I&#8217;ll play detective later and figure out what is going on.</p>
<p>Besides the update issues, the reinstall went great. Since I have a fresh start, I&#8217;m also trying a few new things. For example, I&#8217;m no long user Apache to server this blog, but went with a lighttpd installation. Besides the smaller memory footprint, the syntax in the conf file seems much more intuitive.</p>
<p>Since I had a full backup of my home directory. I still had all my .*rc files (vim, bash, etc) and all my Firefox settings (and extensions!) which was a great surprise, but makes sense.</p>
<p>Two snafus that I did run into:<br />
1) Firefox lost its back-button functionality. The back-button would never become highlighted. I did a quick google and this did not seem to be a problem anyone else was having, so I figured it was an extension conflict. Sure enough the &#8220;Web Developer Toolbar&#8221; was acting up somehow and uninstalling got Firefox behaving properly again. With Firebug in my arsenal, I hardly use the Toolbar anymore, so I&#8217;m not too upset about that.</p>
<p>2) Something with the Hemingway WordPress theme was behaving properly running under FastCGI. I&#8217;m not really sure what was going on here, but every time I saved some thing in the admin, I&#8217;d get the standard PHP &#8216;can&#8217;t resend headers&#8217; error message. I switched to one of the default themes and it resolved itself. I&#8217;m not sure what the theme could have been interfering with in the admin screen, but oh well.</p>
<p>Besides that Gutsy as an OS looks great. Can&#8217;t complain a bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://nolancaudill.com/index.php/2007/10/19/gutsy-reinstall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->