-
Ubuntu Icons Directory Routing
06 December 2012
Read moreI had the weirdest problem the other day so I thought I'd write it down! I uploaded a toy script for someone, but it had images in it and they wouldn't load. The image files existed, and I could request everything around them, files in other subdirectories were okay; the …
-
Apache Config: .htaccess or Virtual Hosts?
12 April 2012
Read moreHow to set apache configuration for your web projects? Some settings have to be in the main apache config or in a virtual host, but for many others you have two good choices; either use an `.htaccess <http://httpd.apache.org/docs/2.2/configuring.html#htaccess>`__ file, or …
-
Building A RESTful PHP Server: Understanding the Request
19 January 2012
Read moreOnce upon a time, what seems like a lifetime ago, I was away for a couple of weeks, and I wrote a series of posts about serving RESTful APIs from PHP to keep my blog going while I was away. Fast forward a few years and those posts are outdated and still wildly popular - so I thought it was about time I revisited this and showed how I'm writing RESTful PHP servers today!
In the first part of this (probably) 3-part series, we'll begin with the basics. It might seem boring, but the most important thing to get right with REST is parsing all the various elements of the HTTP request and responding accordingly. I've put in code samples from from a small-scale toy project I created to make me think about the steps involved (should I put the code somewhere so you can see it? Let me know). Without further ado, let's dive in and begin by sending all requests through one bootstrap script:
-
Apache on Ubuntu/Debian
14 June 2011
Read moreApache on Debian. Ubuntu
When I first started using Ubuntu, I was coming from a distro journey that started with FreeBSD and took in Mandrake and Gentoo along the way; I hadn't worked with any Debian-based systems before and was new to the way that Apache is configured on those platforms.