OxAlto Capita – A Free Theme for Mango Blog

As I’ve been exploring some more CF open source apps, I’ve come across Mango Blog which I’m really beginning to like.

So, as an attempt to get to the know the bits under the hood, I’ve written a theme which I’ve decided to release under Creative Commons – so that’s free to use for all you Mango Blog users.

It’s based on the Blueprint CSS framework, so hopefully you should be able to take advantage on the various layout schemes incorporated into that.

The banner image remains property of The Hinksey Studio, but has been released for use in this theme.

Thumbnail for Oxalto Capita v1.0
Edit: This is now available directly via the Mango Blog Admin interface – Thanks Laura!

BluePrint CSS wrapper for BlogCFC

Quick BlueprintCSS wrapper for BlogCFC v0.1

This is a set of starter stylesheets using the BluePrintCSS framework (see http://www.blueprintcss.org/ for full usage) for BlogCFC. As always, I take no responsibility whatsoever for anything you might do with this.

Essentially all I’ve done is add the BluePrintCSS as the main starting point, and added a few classes to the layout customtag so it works under Blueprints CSS concept. Also added a few custom classes in bp_custom.css to make it a bit prettier. Add your changes to bp_custom.css – as it’s the last one to be called, it’ll override anything set in the defaults.

Tested briefly on BlogCFC 5.9.3.006

NB: This is meant as a starting point – I’ve not spent ages with elements like the pods etc. Hopefully it’ll save someone somewhere some time – the reason I’ve bothered putting it in a zip is that I have to integrate blogCFC into most of my sites (which happen to always use BluePrint);

Install instructions:

  1. Backup/Move/Rename the file at /yourblog/tags/layout.cfm
  2. Download the zip and decompress
  3. Copy layout.cfm into /yourblog/tags/
  4. Copy the four stylesheets into /yourblog/includes/
  5. Restart the blogCFC cache using /?reinit=1

Credits:

Screenshot

Download

Railo / Apache / Tomcat / Mura CMS/ SES URL Gotcha

Another catchy title :)

I’ve been trying for a day or two to get SES Urls working on Tomcat/Railo/Apache/Mura;

Specifically, I’m thinking of the /index.cfm/something/ style syntax. Having installed Mura, I couldn’t get any of the actual pages past the front page to work. I got an Apache 404 error.

Sean Corfield’s Blog gave me a good starting point.

As I’d installed Railo via the Beta install script, my config was a little different to some which is what gave me the headache.

Firstly, I had to get Tomcat to receive the requests, as Apache was serving me the 404s;

In my Apache httpd.conf file, I had the following at the bottom:

JkMount /*.cfm ajp13
JkMount /*.cfc ajp13
JkMount /*.do ajp13
JkMount /*.jsp ajp13
JkMount /*.cfchart ajp13
JkMountCopy all
JkLogFile /var/log/httpd/mod_jk.log

Note, the *.cfm entry – this needs changing to:

JkMount /*.cfm* ajp13

This means apache matched the correct syntax to pass the request to Tomcat.

So at that point, I was getting 404′s served by Tomcat rather than Apache; at least they were getting to the correct place.

For me, my Tomcat install lives in /opt/railo/tomcat/, so I found the web.xml file in /opt/railo/tomcat/conf/ and changed added a servlet mapping:

CFMLServlet /index.cfm/*

And then tried again with Mura. No joy – still 404′s in Tomcat; Having re-read Sean’s entry, it turns out you have to specify if you want the pattern to match a directory;

So the servlet mapping I’d put up would match /index.cfm/*, but not, as Mura users know, the default Mura behaviour of /default/index.cfm/*

Changing to:

CFMLServlet /default/index.cfm/*

Sorts it.

I know there’s a jar file supplied by Mura to fix this – but with my seemingly different Tomcat config, I could work out how to get it working properly.

Next stage is going to have to be to get the URL rewriting working to get proper URLs like /about-us/, rather than /default/index.cfm/about-us/.

Finally – some Railo VPS goodness

I think I’m slightly over the top happy that I’ve got Railo working now..

All thanks to Jordan Michaels’s beta installer (get on the Google Railo Beta list to get access – http://groups.google.com/group/railo-beta/) which worked perfectly.

Had a couple of hiccups, but they were completely my own fault – I was getting a 503 error whenever I tried to serve a .cfm page; checked the logs, and low and behold TomCat couldn’t start: something was using port 8080. (A java.net.BindException: Address already in use:8080 error)

A quick “netstat -anp | grep 8080″ command, and lo and behold, I’d set Apache to listen on 8080 in the http.conf.

Took that out, and restart apache/railo, and all is happy.

Now I’ve just got to read up on Railo security, and pop a bit more RAM In the VPS (it sits at about 140MB with railo/mysql/tomcat and the OS), oh and test *everything*.

As Hannibal would say – “I love it when a plan comes together” :)

In at the deep end – getting a VPS

Well, after some research, I’ve decided to go and take the plunge and get a basic VPS.

My aim is to get Railo/Resin/Apache/PHP/MySQL running on Centos 5.3.

I’ve gone for Wizz VPS, as they’re UK based, and a child company of my current PHP hosting – Layershift, with whom I’ve had good experiences – they are also staggeringly cheap.

They’re also completely unmanaged, so I’m on my own…

Getting mySQL and PHP installed was easy, just using the VPS containers package management system (so a bit of point and click). Installing yum and then using that was equally easy. ‘yum update’ = genius.

I’ve been fairly taken back by just *how* efficiently RAM seems to be handled under Linux/Centos. I’m used to a windows box, where just running the OS and CF8 can take up the best part of a GB. I’ve currently got MySQL and PHP, and the OS running under 40MB (not under any load of course) which is amazing.

The tricky part is going to be getting Railo in and running. Whilst there seems to be a fair amount of chat on the Railo Google group about creating some definitive install guides, I’m finding the lack of a definitive install guide somewhat frustrating. I’ve managed to do some things, like install Java for compiling connectors etc, but the syntax (and really, the true understanding of what I’m trying to achieve) does escape me a bit at the moment. My Linux Kung-Fu needs work.

Hopefully we should start seeing some proper documentation for Railo production environments soon! (and I mean documentation for the latest Railo version, and the latest and greatest Linux distros).

One area where Open Source Railo should make a difference…

With the release of Railo 3.1 as an open source project, I can think of one area in particular where this is going to make a huge difference – hosting.

UK hosts seem to split into two camps (IMO), LAMP specialists, and then CF providers, often running Win2003/IIS/CF/MySQL/SQL server.

With UK hosting, there is a huge disparity between hosting for standard LAMP, and CF hosting: Not just price, but diskspace and bandwidth. You can pick up a linux PHP based VPS with 30GB webspace and about 300GB of bandwidth for a fraction of the price the equivalent would be with CF hosting: the reason is fairly obvious – CF licenses (and windows server licences) cost a lot – shared hosts in particular seem to cram a lot onto several larger servers to stretch the license as widely as possible (I’m not saying LAMP hosts don’t), so diskspace (in particular) is at a premium.

Previously I’ve considered getting a VPS, and simply buying a CF standard license, as generally speaking, that suits my freelance needs; but that extra £1000 odd is simply crippling, and makes the whole idea unuseable.

I run a lot of smaller sites, none of which could afford the CF outlay and rely heavily on shared hosting – the irony is, as they’re built in CF, they were initially quicker and thus cheaper to build.

I hope we’ll start to see Railo offered as another service alongside PHP: there’s now no reason *not* too, except the obvious maintence required for an additional service, and the potential hit to the server’s RAM in actually running it. Alternatively, this could all go the way of OBD or the smith project, but I hope not.

Whilst there are many sides to this argument, especially the effect on CFML as a language, this announcement is something I’m really rather pleased about overall – it gives many more sites the option of using CFML, especially those smaller ones which would otherwise have to go on PHP for budget reasons. Additionally, for higher education, running Railo should now be a no brainer – after all, it’s free, why not at least try it?

I’m now seriously considering consolidating all my hosting into a single linux VPS with PHP, Railo and MySQL. Being able to run Drupal and all my bespoke CF projects under the same roof is very appealing. Now all it takes is do some research into Railo properly, and check there aren’t any massive “gotchas”. Speaking of which, is there a good CF8 vs Railo 3.1 comparison out there anywhere yet?

Being on iTunesU

I’m lucky enough to work for Oxford University, and part of my job is web development for the James Martin 21st Century School – a bespoke CF site I wrote which I’m constantly tinkering with.

Oxford University recently launched its presence on iTunesU, the learning and education channel on iTunes.

The School has been lucky enough to have several podcasts of major events which have been well featured on both the University’s front iTunesU page, but also the main iTunesU page itself.

One of our podcasts is currently appearing on iTunesU front page – Stiglitz on the Credit Crunch (for the second time); a great talk and very topical given the current climate. When this was launched, this podcast stayed at the top of the “most downloaded” list on iTunes for many, many weeks, and is still in the Top 10 podcasts within the University.

So what does that actually mean in terms of hits and bandwidth?

For that one podcast, it’s been downloaded 44,000 times, of which I’d estimate 90% came from iTunes.

2008 .mp3 Traffic: 3426.09 GB 
(iTunes Oxford launch was in October)

2009 .mp3 Traffic so far: 228.07 GB
(to beginning of March)

Total Downloads for podcasts: over 180,000 and counting, of which iTunesU accounts for probably 60% of that traffic.

So be warned, one mp3 is all it takes! It’s been a fantastic start, and now we’ve just got to keep the momentum going.

Sidenote: Obviously in a higher education environment, our webserver is on JANET, the academic network, and it’s also connected via Gigabit. As a University we pay JANET for access, but don’t, to the best of my knowledge, pay per GB traffic or anything. We’ve also got a dedicated server for the site, so we’ve never had an issue with memory etc. At the iTunes peak, the webserver was pumping out at least 50MB a second (and constantly, for quite a while…)

Some new sites..

A few new sites released recently:

With Drupal:

Custom ColdFusion work:

Other:

Search Engines not respecting CFLOCATION?

I’ve been seeing some wierd behaviour from a local search engine on one of my sites; I say local, as it’s a Google Search Appliance designed to trawl the ox.ac.uk domain.

What I can’t understand is what it doesn’t seem to respect CFLOCATION’s default redirect.

BlogCFC uses CFLOCATION quite a lot, especially when URL variables don’t exist, which is where I’m seeing this the most:

Let’s say I have a page which has:







Which tells the browser to essentially go away unless url.foo equals “foo”.
Let’s say that I’ve got some code in the remainder of the page that relies on url.foo – it then throws an error which I get by email.

I’ve been seeing these errors, ONLY triggered by this GSA, which could only have happened had the page been resolved; I understand this is a 302 redirect, not a 301 redirect, but shouldn’t the GSA respect the browser command of redirect and stop rendering the page? This isn’t an error a human can throw!

Why only this one GSA? Could it be a configuration issue?

I’m going to try adding a cfheader to change it to a 301 redirect and see what happens…

Any ideas welcomed…

Occasionally confused by Gmail

I had a bizarre problem the other day – well, these things are always bizarre when you don’t know the reason or solution – with Gmail.

Whenever I put 10am in an email, it would hyperlink it to http://10.am/ which brings up a slightly random website.

10.30 a.m. would be fine, as would 11pm, etc

Turns out, Gmail was doing it’s usual autolinking, like it’ll do to “example.com”: little did I know that “am” is actually a legitimate domain identifier, and it was reading my time as a domain name!