<?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>Fighting Rabbits &#187; Coding</title>
	<atom:link href="http://fightingrabbits.com/archives/category/coding/feed" rel="self" type="application/rss+xml" />
	<link>http://fightingrabbits.com</link>
	<description>and herding cats...</description>
	<lastBuildDate>Wed, 23 Jun 2010 12:28:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Django on Snow Leopard</title>
		<link>http://fightingrabbits.com/archives/266</link>
		<comments>http://fightingrabbits.com/archives/266#comments</comments>
		<pubDate>Sun, 04 Oct 2009 10:24:15 +0000</pubDate>
		<dc:creator>Richard Cooper</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[easy_install]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[Software.]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://fightingrabbits.com/?p=266</guid>
		<description><![CDATA[Having just been given an new MacBook Pro as an early birthday present, it didn&#8217;t take me long to try and install Django on it. Rather than use the MacPorts solution I decided to use the native python 2.6 and build the rest, apart from MySQL (use the Mac OS X 10.5 (x86_64) package from [...]]]></description>
			<content:encoded><![CDATA[<p>Having just been given an new MacBook Pro as an early birthday present, it didn&#8217;t take me long to try and install Django on it. Rather than use the MacPorts solution I decided to use the native python 2.6 and build the rest, apart from MySQL (use the Mac OS X 10.5 (x86_64) package from <a href="http://dev.mysql.com/downloads/mysql/5.1.html#downloads">here</a>)</p>
<p>Before proceeding make sure that you have installed XCode (It&#8217;s on the Snow Leopard install disc) as we need it to install libjpeg and PIL (all of my Django projects use this!)</p>
<p>Download <a href="http://freshmeat.net/urls/6228c609a20bb6f87b2fef4fd4b6a30c">libjpeg</a> then:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> jpegsrc-1.v7.tar
<span style="color: #7a0874; font-weight: bold;">cd</span> jpegsrc-1.v7
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">which</span> glibtool<span style="color: #000000; font-weight: bold;">`</span> .<span style="color: #000000; font-weight: bold;">/</span>libtool
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #c20cb9; font-weight: bold;">env</span> MACOSX_DEPLOYMENT_TARGET <span style="color: #000000;">10.6</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-shared</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Now we can download the <a href="http://effbot.org/media/downloads/Imaging-1.1.6.tar.gz">source</a> and build PIL</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> Imaging-1.1.6.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> Imaging-1.1.6
<span style="color: #c20cb9; font-weight: bold;">sudo</span> python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Last thing to do before we install Django is to install the MySqlDb connector &#8211; you will need to do add the following to your .bash_profile</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${PATH}</span>:/usr/local/mysql/bin&quot;</span></pre></div></div>

<p>Then:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> easy_install mysql-python</pre></div></div>

<p>Now we can easy_install Django:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> easy_install django</pre></div></div>

<p>and we are all set to go :)</p>
<p>Thanks to these guys for the help in figuring this out:<br />
<a href="http://dryan.com/articles/snow-leopard-64bit-mamp/">http://dryan.com/</a><br />
<a href="http://www.brambraakman.com/blog/comments/installing_mysql_python_mysqldb_on_snow_leopard_mac_os_x_106/">http://www.brambraakman.com/blog/</a><br />
<a href="http://colbypalmer.com/index.php?/colbyworld/blogEntry/install_libjpeg_and_pil_on_os_x_leopard/">http://colbypalmer.com/</a><br />
<a href="http://www.agapow.net/programming/python/installing-mysqldb">http://www.agapow.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fightingrabbits.com/archives/266/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Nginx &amp; Django on Webfaction (Part&#160;1b) – Configuring</title>
		<link>http://fightingrabbits.com/archives/160</link>
		<comments>http://fightingrabbits.com/archives/160#comments</comments>
		<pubDate>Mon, 07 Sep 2009 12:18:46 +0000</pubDate>
		<dc:creator>Richard Cooper</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[webfaction]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://fightingrabbits.com/?p=160</guid>
		<description><![CDATA[In Part 1a of this series we compiled Nginx and Installed Django in this next part we are going to configure nginx and Django and get our welcome page displaying. First lets configure nginx, the default conf file looks like this: #user nobody; worker_processes 1; &#160; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>In Part 1a of this series we compiled Nginx and Installed Django in this next part we are going to configure nginx and Django and get our welcome page displaying.</p>
<p>First lets configure nginx, the default conf file looks like this:</p>
<p><span id="more-160"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#user  nobody;</span>
worker_processes  <span style="color: #000000;">1</span>;
&nbsp;
<span style="color: #666666; font-style: italic;">#error_log  logs/error.log;</span>
<span style="color: #666666; font-style: italic;">#error_log  logs/error.log  notice;</span>
<span style="color: #666666; font-style: italic;">#error_log  logs/error.log  info;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#pid        logs/nginx.pid;</span>
&nbsp;
&nbsp;
events <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    worker_connections  <span style="color: #000000;">1024</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
&nbsp;
http <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    include       mime.types;
    default_type  application<span style="color: #000000; font-weight: bold;">/</span>octet-stream;
&nbsp;
    <span style="color: #666666; font-style: italic;">#log_format  main  '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '</span>
    <span style="color: #666666; font-style: italic;">#                  '$status $body_bytes_sent &quot;$http_referer&quot; '</span>
    <span style="color: #666666; font-style: italic;">#                  '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#access_log  logs/access.log  main;</span>
&nbsp;
    sendfile        on;
    <span style="color: #666666; font-style: italic;">#tcp_nopush     on;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#keepalive_timeout  0;</span>
    keepalive_timeout  <span style="color: #000000;">65</span>;
&nbsp;
    <span style="color: #666666; font-style: italic;">#gzip  on;</span>
&nbsp;
    server <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        listen       <span style="color: #000000;">80</span>;
        server_name  localhost;
&nbsp;
        <span style="color: #666666; font-style: italic;">#charset koi8-r;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">#access_log  logs/host.access.log  main;</span>
&nbsp;
        location <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
            root   html;
            index  index.html index.htm;
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">#error_page  404              /404.html;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># redirect server error pages to the static page /50x.html</span>
        <span style="color: #666666; font-style: italic;">#</span>
        error_page   <span style="color: #000000;">500</span> <span style="color: #000000;">502</span> <span style="color: #000000;">503</span> <span style="color: #000000;">504</span>  <span style="color: #000000; font-weight: bold;">/</span>50x.html;
        location = <span style="color: #000000; font-weight: bold;">/</span>50x.html <span style="color: #7a0874; font-weight: bold;">&#123;</span>
            root   html;
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># proxy the PHP scripts to Apache listening on 127.0.0.1:80</span>
        <span style="color: #666666; font-style: italic;">#</span>
        <span style="color: #666666; font-style: italic;">#location ~ \.php$ {</span>
        <span style="color: #666666; font-style: italic;">#    proxy_pass   http://127.0.0.1;</span>
        <span style="color: #666666; font-style: italic;">#}</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000</span>
        <span style="color: #666666; font-style: italic;">#</span>
        <span style="color: #666666; font-style: italic;">#location ~ \.php$ {</span>
        <span style="color: #666666; font-style: italic;">#    root           html;</span>
        <span style="color: #666666; font-style: italic;">#    fastcgi_pass   127.0.0.1:9000;</span>
        <span style="color: #666666; font-style: italic;">#    fastcgi_index  index.php;</span>
        <span style="color: #666666; font-style: italic;">#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;</span>
        <span style="color: #666666; font-style: italic;">#    include        fastcgi_params;</span>
        <span style="color: #666666; font-style: italic;">#}</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># deny access to .htaccess files, if Apache's document root</span>
        <span style="color: #666666; font-style: italic;"># concurs with nginx's one</span>
        <span style="color: #666666; font-style: italic;">#</span>
        <span style="color: #666666; font-style: italic;">#location ~ /\.ht {</span>
        <span style="color: #666666; font-style: italic;">#    deny  all;</span>
        <span style="color: #666666; font-style: italic;">#}</span>
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
&nbsp;
    <span style="color: #666666; font-style: italic;"># another virtual host using mix of IP-, name-, and port-based configuration</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;">#server {</span>
    <span style="color: #666666; font-style: italic;">#    listen       8000;</span>
    <span style="color: #666666; font-style: italic;">#    listen       somename:8080;</span>
    <span style="color: #666666; font-style: italic;">#    server_name  somename  alias  another.alias;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#    location / {</span>
    <span style="color: #666666; font-style: italic;">#        root   html;</span>
    <span style="color: #666666; font-style: italic;">#        index  index.html index.htm;</span>
    <span style="color: #666666; font-style: italic;">#    }</span>
    <span style="color: #666666; font-style: italic;">#}</span>
&nbsp;
&nbsp;
    <span style="color: #666666; font-style: italic;"># HTTPS server</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;">#server {</span>
    <span style="color: #666666; font-style: italic;">#    listen       443;</span>
    <span style="color: #666666; font-style: italic;">#    server_name  localhost;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#    ssl                  on;</span>
    <span style="color: #666666; font-style: italic;">#    ssl_certificate      cert.pem;</span>
    <span style="color: #666666; font-style: italic;">#    ssl_certificate_key  cert.key;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#    ssl_session_timeout  5m;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#    ssl_protocols  SSLv2 SSLv3 TLSv1;</span>
    <span style="color: #666666; font-style: italic;">#    ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;</span>
    <span style="color: #666666; font-style: italic;">#    ssl_prefer_server_ciphers   on;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#    location / {</span>
    <span style="color: #666666; font-style: italic;">#        root   html;</span>
    <span style="color: #666666; font-style: italic;">#        index  index.html index.htm;</span>
    <span style="color: #666666; font-style: italic;">#    }</span>
    <span style="color: #666666; font-style: italic;">#}</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Now that we have seen the default file let&#8217;s back it up and start from scratch :)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/</span>conf
<span style="color: #c20cb9; font-weight: bold;">mv</span> nginx.conf nginx.conf.bak
<span style="color: #c20cb9; font-weight: bold;">nano</span> nginx.conf</pre></div></div>

<p>First we need to set our basic Nginx properties:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#2 workers x 1024 connections gives us some resiliance and should be enough for most sites.</span>
worker_processes <span style="color: #000000;">2</span>;
&nbsp;
events <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    worker_connections <span style="color: #000000;">1024</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
http <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    include             mime.types;
    default_type        application<span style="color: #000000; font-weight: bold;">/</span>octet-stream;	
&nbsp;
    server <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        listen  myport;
        server_name mydomain;
        <span style="color: #666666; font-style: italic;">#You will need to change the next line to something bigger if you want to accept uploads over 5Mb</span>
        client_max_body_size 5m;
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Remember to replace myport and mydomain with your actual values from Part 1a!</p>
<p>Next let&#8217;s setup our http server config to serve our static media (You could setup a static only app to serve your media from the main Apache Instance, but let&#8217;s do it this way as a learning exercise.) We are going to add one location for all our static media, and one location just to serve the favicon. Edit the http section to look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">http <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp;
    include             mime.types;
    default_type        application<span style="color: #000000; font-weight: bold;">/</span>octet-stream;	
&nbsp;
    server <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        listen  myport;
        server_name mydomain;
        client_max_body_size 5m;
&nbsp;
        location <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
            <span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/&lt;</span>myproject<span style="color: #000000; font-weight: bold;">&gt;/</span>media<span style="color: #000000; font-weight: bold;">/</span>;
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
        location ~<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>favicon.ico <span style="color: #7a0874; font-weight: bold;">&#123;</span>
            root <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/&lt;</span>myproject<span style="color: #000000; font-weight: bold;">&gt;/</span>media<span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>;
            <span style="color: #666666; font-style: italic;">#Let's not waste time logging this access...</span>
            access_log off;
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Again remember to replace <myusername>, <myapp> and <myproject> with your actual values.</p>
<p>Right now let&#8217;s setup nginx to talk to our fastcgi django process add this section into the configuration file after the favicon.ico location:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">location <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    proxy_set_header  	         X-Real-IP  <span style="color: #007800;">$remote_addr</span>;
    proxy_set_header             X-Forwarded-For <span style="color: #007800;">$proxy_add_x_forwarded_for</span>;
    fastcgi_pass                unix:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/&lt;</span>myproject<span style="color: #000000; font-weight: bold;">&gt;/</span>django.sock;
    fastcgi_pass_header          Authorization;          
    fastcgi_hide_header          X-Accel-Redirect;
    fastcgi_hide_header          X-Sendfile;
    fastcgi_intercept_errors     off;
    include                        fastcgi_params;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Our nginx.conf should now look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#2 workers x 1024 connections gives us some resiliance and should be enough for most sites.</span>
worker_processes <span style="color: #000000;">2</span>;
&nbsp;
events <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    worker_connections <span style="color: #000000;">1024</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
http <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    include             mime.types;
    default_type        application<span style="color: #000000; font-weight: bold;">/</span>octet-stream;	
&nbsp;
    server <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        listen  myport;
        server_name mydomain;
        client_max_body_size 5m;
&nbsp;
        location <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
           <span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/&lt;</span>myproject<span style="color: #000000; font-weight: bold;">&gt;/</span>media<span style="color: #000000; font-weight: bold;">/</span>;
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
        location ~<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>favicon.ico <span style="color: #7a0874; font-weight: bold;">&#123;</span>
           root <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/&lt;</span>myproject<span style="color: #000000; font-weight: bold;">&gt;/</span>media<span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>;
           <span style="color: #666666; font-style: italic;">#Let's not waste time logging this access...</span>
           access_log off;
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
        location <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
            proxy_set_header  	        X-Real-IP  <span style="color: #007800;">$remote_addr</span>;
            proxy_set_header            X-Forwarded-For <span style="color: #007800;">$proxy_add_x_forwarded_for</span>;
            fastcgi_pass                unix:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/&lt;</span>myproject<span style="color: #000000; font-weight: bold;">&gt;/</span>django.sock;
            fastcgi_pass_header         Authorization;          
            fastcgi_hide_header         X-Accel-Redirect;
            fastcgi_hide_header         X-Sendfile;
            fastcgi_intercept_errors    off;
            include                     fastcgi_params;
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>We need to make a slight change to the fastcgi_params file that is being included so that it works correctly with Django. Comment out the following line by placing a # in front of it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">fastcgi_param  SCRIPT_NAME		 <span style="color: #007800;">$fastcgi_script_name</span>;</pre></div></div>

<p>and add this just above it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">fastcgi_param  PATH_INFO          <span style="color: #007800;">$fastcgi_script_name</span>;</pre></div></div>

<p>You can download the complete sample files here <a href='http://fightingrabbits.com/wp-content/uploads/2009/09/configfiles.zip'>zip</a> / <a href='http://fightingrabbits.com/wp-content/uploads/2009/09/configfiles.tar.gz'>gz</a></p>
<p>Django configuration is pretty simple as we can use the default settings file for now:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Django settings for myproject project.</span>
&nbsp;
DEBUG = True
TEMPLATE_DEBUG = DEBUG
&nbsp;
ADMINS = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
    <span style="color: #666666; font-style: italic;"># ('Your Name', 'your_email@domain.com'),</span>
<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
MANAGERS = ADMINS
&nbsp;
DATABASE_ENGINE = <span style="color: #ff0000;">''</span>           <span style="color: #666666; font-style: italic;"># 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.</span>
DATABASE_NAME = <span style="color: #ff0000;">''</span>             <span style="color: #666666; font-style: italic;"># Or path to database file if using sqlite3.</span>
DATABASE_USER = <span style="color: #ff0000;">''</span>             <span style="color: #666666; font-style: italic;"># Not used with sqlite3.</span>
DATABASE_PASSWORD = <span style="color: #ff0000;">''</span>         <span style="color: #666666; font-style: italic;"># Not used with sqlite3.</span>
DATABASE_HOST = <span style="color: #ff0000;">''</span>             <span style="color: #666666; font-style: italic;"># Set to empty string for localhost. Not used with sqlite3.</span>
DATABASE_PORT = <span style="color: #ff0000;">''</span>             <span style="color: #666666; font-style: italic;"># Set to empty string for default. Not used with sqlite3.</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Local time zone for this installation. Choices can be found here:</span>
<span style="color: #666666; font-style: italic;"># http://en.wikipedia.org/wiki/List_of_tz_zones_by_name</span>
<span style="color: #666666; font-style: italic;"># although not all choices may be available on all operating systems.</span>
<span style="color: #666666; font-style: italic;"># If running in a Windows environment this must be set to the same as your</span>
<span style="color: #666666; font-style: italic;"># system time zone.</span>
TIME_ZONE = <span style="color: #ff0000;">'America/Chicago'</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Language code for this installation. All choices can be found here:</span>
<span style="color: #666666; font-style: italic;"># http://www.i18nguy.com/unicode/language-identifiers.html</span>
LANGUAGE_CODE = <span style="color: #ff0000;">'en-us'</span>
&nbsp;
SITE_ID = <span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># If you set this to False, Django will make some optimizations so as not</span>
<span style="color: #666666; font-style: italic;"># to load the internationalization machinery.</span>
USE_I18N = True
&nbsp;
<span style="color: #666666; font-style: italic;"># Absolute path to the directory that holds media.</span>
<span style="color: #666666; font-style: italic;"># Example: &quot;/home/media/media.lawrence.com/&quot;</span>
MEDIA_ROOT = <span style="color: #ff0000;">''</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># URL that handles the media served from MEDIA_ROOT. Make sure to use a</span>
<span style="color: #666666; font-style: italic;"># trailing slash if there is a path component (optional in other cases).</span>
<span style="color: #666666; font-style: italic;"># Examples: &quot;http://media.lawrence.com&quot;, &quot;http://example.com/media/&quot;</span>
MEDIA_URL = <span style="color: #ff0000;">''</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a</span>
<span style="color: #666666; font-style: italic;"># trailing slash.</span>
<span style="color: #666666; font-style: italic;"># Examples: &quot;http://foo.com/media/&quot;, &quot;/media/&quot;.</span>
ADMIN_MEDIA_PREFIX = <span style="color: #ff0000;">'/media/'</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Make this unique, and don't share it with anybody.</span>
SECRET_KEY = <span style="color: #ff0000;">'4#(%&amp;p)^37k2ihr-q-k73qau44ec&amp;8k==gyxb)1+$pck@4+qp='</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># List of callables that know how to import templates from various sources.</span>
TEMPLATE_LOADERS = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
    <span style="color: #ff0000;">'django.template.loaders.filesystem.load_template_source'</span>,
    <span style="color: #ff0000;">'django.template.loaders.app_directories.load_template_source'</span>,
<span style="color: #666666; font-style: italic;">#     'django.template.loaders.eggs.load_template_source',</span>
<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
MIDDLEWARE_CLASSES = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
    <span style="color: #ff0000;">'django.middleware.common.CommonMiddleware'</span>,
    <span style="color: #ff0000;">'django.contrib.sessions.middleware.SessionMiddleware'</span>,
    <span style="color: #ff0000;">'django.contrib.auth.middleware.AuthenticationMiddleware'</span>,
<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
ROOT_URLCONF = <span style="color: #ff0000;">'myproject.urls'</span>
&nbsp;
TEMPLATE_DIRS = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
    <span style="color: #666666; font-style: italic;"># Put strings here, like &quot;/home/html/django_templates&quot; or &quot;C:/www/django/templates&quot;.</span>
    <span style="color: #666666; font-style: italic;"># Always use forward slashes, even on Windows.</span>
    <span style="color: #666666; font-style: italic;"># Don't forget to use absolute paths, not relative paths.</span>
<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
INSTALLED_APPS = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
    <span style="color: #ff0000;">'django.contrib.auth'</span>,
    <span style="color: #ff0000;">'django.contrib.contenttypes'</span>,
    <span style="color: #ff0000;">'django.contrib.sessions'</span>,
    <span style="color: #ff0000;">'django.contrib.sites'</span>,
<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Finally we need to start our servers:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/</span>
.<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>nginx
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">&lt;</span>myproject<span style="color: #000000; font-weight: bold;">&gt;</span>
python2.5 manage.py runfcgi <span style="color: #007800;">maxchildren</span>=<span style="color: #000000;">1</span> <span style="color: #007800;">maxspare</span>=<span style="color: #000000;">1</span> <span style="color: #007800;">method</span>=prefork <span style="color: #007800;">socket</span>=<span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">/</span>django.sock <span style="color: #007800;">pidfile</span>=<span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">/</span>django.pid <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> $</pre></div></div>

<p>If you haven&#8217;t done it already mount your app in a domain from the webfaction control panel and then browse to the correct url and you should see the following:</p>
<div id="attachment_162" class="wp-caption aligncenter" style="width: 310px"><a href="http://fightingrabbits.com/wp-content/uploads/2009/08/django-app.png"><img src="http://fightingrabbits.com/wp-content/uploads/2009/08/django-app-300x107.png" alt="Django Welcome Screen" title="Django Welcome Screen" width="300" height="107" class="size-medium wp-image-162" /></a><p class="wp-caption-text">Django Welcome Screen</p></div>
<p>So there you have it &#8211; we have installed and configured Nginx + Django however we still have a few thing&#8217;s to do&#8230; In Part 2 I&#8217;ll show you a couple of ways to make sure that our site isn&#8217;t down for long if the web-server is rebooted or Django crashes.</p>
<p>In Part 3 I&#8217;ll show you how to hand off file uploads to Nginx and get a fancy upload progress bar into the bargin :D</p>
<p>This post was brought to you by the letters L and A and the following websites.</p>
<p><a href="http://forum.webfaction.com/viewtopic.php?id=1981">http://forum.webfaction.com/viewtopic.php?id=1981</a></p>
<p><a href="https://calomel.org/nginx.html">https://calomel.org/nginx.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fightingrabbits.com/archives/160/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Nginx &amp; Django on Webfaction (Part&#160;1a) &#8211; Installing</title>
		<link>http://fightingrabbits.com/archives/139</link>
		<comments>http://fightingrabbits.com/archives/139#comments</comments>
		<pubDate>Thu, 13 Aug 2009 22:23:31 +0000</pubDate>
		<dc:creator>Richard Cooper</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[webfaction]]></category>

		<guid isPermaLink="false">http://fightingrabbits.com/?p=139</guid>
		<description><![CDATA[This is aimed at Installing and configuring Django running as a FCGI Process behind Nginx on <a href="http://webfaction.com">WebFaction</a> shared hosting. Later on in this series I will be showing how to create fancy ajax upload progress indicators with most of the work done by Nginx, and also how to hand off the work of large downloads back to Nginx.]]></description>
			<content:encoded><![CDATA[<p>This is aimed at Installing and configuring Django running as a FCGI Process behind Nginx on <a href="http://webfaction.com">WebFaction</a> shared hosting but can be altered to work with an almost identical setup on Ubuntu 9.04 (Jaunty).</p>
<p>For those who don&#8217;t know Nginx (Engine X) is a Free, open-source, high-performance HTTP server and reverse proxy with the added advantage for shared hosting that it has a low memory footprint &#8211; and Django is a high-level Python Web framework with added magic ponies :)</p>
<p>I&#8217;m creating this tutorial series so that in 3 months time when I need to set this up again for another project I haven&#8217;t forgotten where I put my written notes&#8230; (This is based off several threads in the <a href="http://forum.webfaction.com">WebFaction Forum</a>, some research into Nginx, and a lot of trial and error getting the upload module to work with Django)</p>
<p>Later on in this series I will be showing how to create fancy ajax upload progress indicators with most of the work done by Nginx, and also how to hand off the work of large downloads back to Nginx.</p>
<p>Right, Let&#8217;s get started&#8230;<br />
<span id="more-139"></span><br />
First we need to create a new app in the Webfaction control panel. Create a &#8220;new app listening on port&#8221; and make a note of the port number<br />
<a href="http://fightingrabbits.com/wp-content/uploads/2009/08/create_app.png"><img class="alignnone size-medium wp-image-142" title="Create A new App" src="http://fightingrabbits.com/wp-content/uploads/2009/08/create_app-300x176.png" alt="Create A new App" width="300" height="176" /></a><br />
<a href="http://fightingrabbits.com/wp-content/uploads/2009/08/app_created.png"><img class="alignnone size-medium wp-image-141" title="Make a note of the Port Number" src="http://fightingrabbits.com/wp-content/uploads/2009/08/app_created-300x199.png" alt="Make a note of the Port Number" width="300" height="199" /></a><br />
Next we need to SSH into our account to configure and install (if you are using windows you can use the Putty SSH client.)<br />
First we need to make some sub directories in our webapp folder and install Django and Flup (needed for the FCGI support later)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> bin lib<span style="color: #000000; font-weight: bold;">/</span>python2.5
<span style="color: #007800;">PYTHONPATH</span>=lib<span style="color: #000000; font-weight: bold;">/</span>python2.5 easy_install-<span style="color: #000000;">2.5</span> <span style="color: #660033;">-d</span> lib<span style="color: #000000; font-weight: bold;">/</span>python2.5 <span style="color: #660033;">-s</span> bin http:<span style="color: #000000; font-weight: bold;">//</span>www.djangoproject.com<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.1</span><span style="color: #000000; font-weight: bold;">/</span>tarball<span style="color: #000000; font-weight: bold;">/</span> flup
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>django-admin.py startproject myproject</pre></div></div>

<p>Now we need to download and untar the latest stable versions of Nginx, Nginx_UploadProgress_Module and PCRE (for the embeded perl in Nginx)<br />
NB. If you need any other modules for Nginx now would be the time to wget them :)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>sysoev.ru<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>nginx-0.7.61.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.csx.cam.ac.uk<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>programming<span style="color: #000000; font-weight: bold;">/</span>pcre<span style="color: #000000; font-weight: bold;">/</span>pcre-7.9.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>wiki.nginx.org<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">83</span><span style="color: #000000; font-weight: bold;">/</span>Nginx_uploadprogress_module-0.5.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> nginx-0.7.61.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> pcre-7.9.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> Nginx_uploadprogress_module-0.5.tar.gz</pre></div></div>

<p>Now lets configure, make and install Nginx</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> pcre-<span style="color: #000000;">7.9</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/</span>pcre
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>nginx-0.7.61
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">--with-pcre</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/</span>pcre-<span style="color: #000000;">7.9</span><span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--add-module</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span>myusername<span style="color: #000000; font-weight: bold;">&gt;/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>myapp<span style="color: #000000; font-weight: bold;">&gt;/</span>nginx_uploadprogress_module<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Assuming we don&#8217;t have any errors</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Now lets clean up before going any further</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-fr</span> nginx-0.7.61
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">*</span>.gz
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-fr</span> pcre-<span style="color: #000000;">7.9</span></pre></div></div>

<p>At this point we should have a working install of Nginx and Django, in Part 1b we will show how to configure them both and get our first page served.</p>
]]></content:encoded>
			<wfw:commentRss>http://fightingrabbits.com/archives/139/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>WebFaction Easy-Install useage.</title>
		<link>http://fightingrabbits.com/archives/125</link>
		<comments>http://fightingrabbits.com/archives/125#comments</comments>
		<pubDate>Sat, 01 Aug 2009 11:37:40 +0000</pubDate>
		<dc:creator>Richard Cooper</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[easy_install]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[webfaction]]></category>

		<guid isPermaLink="false">http://fightingrabbits.com/?p=125</guid>
		<description><![CDATA[I&#8217;m posting this here so that I can remember it :) If you need a Python library to be available to *all* of your Python apps, then install it in the $HOME/lib/python2.5 directory. A shorter version of the command is: Code: 1 easy_install-2.5 -s $HOME/bin -d $HOME/lib/python2.5 the_module_name If you need a Python library to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m posting this here so that I can remember it :)</p>
<p>If you need a Python library to be available to *all* of your Python apps, then install it in the $HOME/lib/python2.5 directory. A shorter version of the command is:<br />
<strong>Code:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">easy_install-<span style="color: #000000;">2.5</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin <span style="color: #660033;">-d</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.5 the_module_name</pre></td></tr></table></div>

<p>If you need a Python library to be available to *one* of your Python apps, then install it in the $HOME/webapps/<appname>/lib/python2.5 directory for that app. You must preface the easy_install command with the PYTHONPATH variable, like so:<br />
<strong>Code:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PYTHONPATH</span>=<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>appname<span style="color: #000000; font-weight: bold;">&gt;/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.5 easy_install-<span style="color: #000000;">2.5</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>appname<span style="color: #000000; font-weight: bold;">&gt;/</span>bin <span style="color: #660033;">-d</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>webapps<span style="color: #000000; font-weight: bold;">/&lt;</span>appname<span style="color: #000000; font-weight: bold;">&gt;/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.5 the_module_name</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://fightingrabbits.com/archives/125/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StoutLabs MooTools Slider</title>
		<link>http://fightingrabbits.com/archives/122</link>
		<comments>http://fightingrabbits.com/archives/122#comments</comments>
		<pubDate>Fri, 31 Jul 2009 10:51:59 +0000</pubDate>
		<dc:creator>Richard Cooper</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://fightingrabbits.com/?p=122</guid>
		<description><![CDATA[Daniel over at StoutLabs has produced a really nice MooTools based image slider, with code that is really easy to understand even for a MooTools beginner like me. We needed to use something similar for a new project at FrozenSkys, which required a few tweaks (like adding fading) to the slider class, and Daniel has [...]]]></description>
			<content:encoded><![CDATA[<p>Daniel over at <a title="StoutLabs" href="http://stoutlabs.com/blog">StoutLabs</a> has produced a really nice MooTools based image slider, with code that is really easy to understand even for a MooTools beginner like me.</p>
<p>We needed to use something similar for a new project at <a href="http://frozenskys.co.uk">FrozenSkys</a>, which required a few tweaks (like adding fading) to the slider class, and Daniel has been kind enough to include these back into his project.</p>
<p>You can find the code and a demo over at his <a title="Mootools Slider V2" href="http://stoutlabs.com/blog/view/updated_mootools_content_slider_class_v2">site.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fightingrabbits.com/archives/122/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microformats, X2V, and testing&#8230;</title>
		<link>http://fightingrabbits.com/archives/42</link>
		<comments>http://fightingrabbits.com/archives/42#comments</comments>
		<pubDate>Tue, 28 Apr 2009 20:02:41 +0000</pubDate>
		<dc:creator>Richard Cooper</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Microformats]]></category>
		<category><![CDATA[X2V]]></category>

		<guid isPermaLink="false">http://fightingrabbits.com/?p=42</guid>
		<description><![CDATA[I&#8217;ve been playing around with Brian Suda&#8217;s X2V transforms from the microformats.org site, and as I needed to get my hand back in with .NET and Visual Studio 2008 I have created a couple of aspx pages and a webservice to provide X2V services. These pages will allow you to pass a url as a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with <a href="http://suda.co.uk/projects/microformats/">Brian Suda&#8217;s X2V</a> transforms from the <a href="http://microformats.org">microformats.org</a> site, and as I needed to get my hand back in with .NET and Visual Studio 2008 I have created a couple of aspx pages and a webservice to provide X2V services. These pages will allow you to pass a url as a parameter</p>
<p>i.e <a href="http://frozenskys.co.uk/hcard2vcard.aspx?url=http://microformats.org/wiki/hcard">http://frozenskys.co.uk/hcard2vcard.aspx?url=http://microformats.org/wiki/hcard</a></p>
<p>and if the page contains a valid hCard or hCalendar get back the corresponding vCard or iCal. Once I have tidied up the code and added one or two more formats, I&#8217;ll post a zip of it here for peeps to play with.</p>
<p>I now need some help testing them so if anybody would like to have a play they can be found here:</p>
<p><a href="http://frozenskys.co.uk/hcard2vcard.aspx?url=http://microformats.org/wiki/hcard">http://frozenskys.co.uk/hcard2vcard.aspx</a></p>
<p><a href="http://frozenskys.co.uk/hcard2vcard.aspx?url=http://microformats.org/wiki/hcard">http://frozenskys.co.uk/hcal2vcal.aspx</a></p>
<p>and the web service can be found here:</p>
<p><a href="http://frozenskys.co.uk/x2v.asmx">http://frozenskys.co.uk/x2v.asmx</a></p>
<p>Let me know if anything breaks :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://fightingrabbits.com/archives/42/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why free software is worth what you pay for it&#8230;</title>
		<link>http://fightingrabbits.com/archives/38</link>
		<comments>http://fightingrabbits.com/archives/38#comments</comments>
		<pubDate>Mon, 13 Apr 2009 11:09:02 +0000</pubDate>
		<dc:creator>Richard Cooper</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[Software.]]></category>

		<guid isPermaLink="false">http://fightingrabbits.com/?p=38</guid>
		<description><![CDATA[We have recently swapped from running our virtual machines in VMWare  to Sun&#8217;s Virtual Box. The performance of virtual box is equal if not better than VMWare, and we will save quite a bit of money on licenses, as all our users would require the workstation version of VMWare. All was well with this plan [...]]]></description>
			<content:encoded><![CDATA[<p>We have recently swapped from running our virtual machines in VMWare  to Sun&#8217;s Virtual Box. The performance of virtual box is equal if not better than VMWare, and we will save quite a bit of money on licenses, as all our users would require the workstation version of VMWare. All was well with this plan until we needed to shrink some of the machines after restoring large DB backups onto them. The command to do this is given as <em>&#8220;VBoxManage modifyhd MyMachine.vdi compact&#8221;</em> unfortunatly the output from this is currently:- <em> &#8221;Error: Shrink hard disk operation is not available!&#8221;  <span style="font-style: normal;">You can see the help ticket for this at <a href="http://www.virtualbox.org/ticket/2833">http://www.virtualbox.org/ticket/2833</a> and it makes pretty horrific reading if you are a fan of open source and expect decent customer support. </span></em></p>
<p>This brings me onto the rant section of this blog. If this was paid for software I could influence the decision &#8211; I could take my cash elsewhere, I could ask to have it fixed as part of my support contract, or several other routes to resolution. As this is &#8220;Free&#8221; software I am reduced to arguing with someone in a defect log item as to whether my issue (and several other peoples as well judging by the defect log) is going to get fixed.</p>
<p>And with comments like <strong><em>&#8220;You are in no position to tell us what to do or not. No amount of complaints from your side will change the priority of this issue.&#8221; </em></strong>it&#8217;s nice to know we are valued customers&#8230;</p>
<p>At the end of it all however we are still going to use VirtualBox, and I am just going to have to hope that Sun will ask their support staff to be a little friendlier.</p>
]]></content:encoded>
			<wfw:commentRss>http://fightingrabbits.com/archives/38/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
