Maintenance pages status codes and Lighttpd

I’ve noticed a few very broken maintenance page Lighttpd config examples around, including the one on the mod_magnet documentation page. They all manage to display the maintenance page ok, but they return a HTTP 200 status code to the client, rather than the more appropriate HTTP 503 code.

As with all 500 status codes, the 503 code is an error code but it signifies a temporary error. The client should try again later (in fact you can specify how much later using the Retry-After header).

A 200 code tells the client everything is normal and OK. So the user gets your nice maintenance page telling them of a temporary outage, whereas their browser gets told that everything is fine. Now this might not be a problem for a user, but if the client is a search engine or a caching proxy then it will assume the maintenance page is the new valid content for the request.

If the Google crawler hits your site when you have the maintenance page up, it will update its search index with your “we’re down for now” message, rather than your cash prizes blog content. Your page rank will drop, your fat Adsense cheque will diminish and you’ll have to go back to your regular nine to five job in the city with people you don’t like in clothes you hate wearing.

So, as you can see, it’s important to return the correct status code. Here’s how to do it with Lighty and mod_magnet:

(more…)

Xen on Ubuntu Edgy broken – Debian to the rescue

Xen LogoI found a great HOWTO on getting a Xen virtual machine up and running on Ubuntu Edgy. Unfortunately, Xen is pretty broken on Edgy. I managed to get one virtual machine running easily but on starting a second one, Dom0 panics and the whole box freezes. It’s been reported on launchpad but as it’s in universe I guess it’s just not a priority.

As a workaround, I installed the Xen kernels from Debian testing (Etch). These pulled in the Debian Xen userspace packages too, but they didn’t clobber anything. So now I have a couple of mostly Edgy virtual machines which I plan to use as a little test lab.

Whilst troubleshooting, I also found another good Debian specific Xen HOWTO with lots of good general advice too.

Etch is looking good. I work with Sarge a lot on servers and firewalls but I’ve not played with Etch much. I think I’ll get it installed in a Xen machine and have a play. I feel bad for not helping with its testing though.

Selected photos of 2006

Of all the photos I took in 2006, these are some of my favourites.

Encrypted partitions with Ubuntu/Debian

I figured out how to set up an encrypted partition on Ubuntu the other day. There are a bunch of ways of doing it but I found this to be the simplest. It should work on Debian too, since all the relevant packages are Debian ones anyway. In my example I’m encrypting an LVM partition (logical volume), but it should work with any device, including removable USB keys (see end notes). UPDATE: This is broken in Edgy but I figured out a simple fix, see below.

(more…)

Hunter vs. Gatherer

photo of Gianni Tedesco coaxing a red Squirrel
From a visit to Freshfield nature reserve, Formby, Merseyside in October.

Mr. Litvinenko’s body

Heard on the radio:

“Pathologists will conduct an autopsy on Mr. Litvinenko’s body this week”

If they are to examine his body, where is Mr. Litvinenko now? Is he in a waiting room? Has he gone back to Russia, leaving his body here for analysis? Maybe he’s gone to heaven.

This statement raises many questions. When Mr. Litvinenko was alive, what was he if not his body? Where was he? How did he control his body? Where was he before his body was born?

Additionally, how come I’ve not heard or read the word “terrorism” anywhere in conjunction with this story? Is it because the Russian Government is involved? Governments can’t commit terrorism?

Why can’t we get on a plane with a tube of arse cream unless it’s in a clear plastic bag but these guys were able to carry radioactive material onboard with no problems?

Opt-out of centralised NHS records

The government are centralising our medical information onto something called the “NHS Spine”. So our entire NHS medical histories will be moved to this system opening it up to general access for millions more employees of:

  • various government agencies including the police and social workers
  • private investigators, media organisations and other commercial entities.

Well, you apparently have the legal right to opt out of this “data rape”:

In June 2005, FIPR developed an opt-out letter to send to the Secretary of State. People who sent this off have been fobbed off. We now recommend that you opt out via your GP. Ask your GP to enter into your record the code 93C3 (“refused consent for upload to national shared electronic record”). You can also ask for your address and phone number to be kept off the NHS internal directory, and for your hospital records also to not be uploaded to central systems: see here for details. We encourage you to opt out even if you have nothing to hide; if only people who do have something embarrassing in their records opt out, then doing so will carry a stigma.

IPSEC VPN problems upgrading to Ubuntu Edgy

I upgraded my home gateway firewall to Edgy today in the hope of fixing some SATA problems I’ve been experiencing. The new Edgy kernel might help – we’ll see.

Anyway, it went pretty well. Two runs (?) of apt-get dist-upgrade -u, a reboot and there I was.

Unfortunately I had two problems with my Openswan IPSEC VPNs. I’m not so sure if these count as bugs. I’ll be investigating further and reporting if so. Anyway, techie details follow…
(more…)

Self-deception

I am regularly amazed at the human capacity for self-deception.

The way people can just ignore inconvenient facts to suit their “world view”.

The way people, when directly questioned, invent reasoning and don’t even realise it. Post-hoc rationalisation.

Lucky that I don’t fall for all that. I’m different.

Air passengers ‘could be tagged’

BBC News is running this press release from the University College London: http://news.bbc.co.uk/1/hi/technology/6044310.stm

“Electronically tagging passengers at airports could help the fight against terrorism, scientists have said.”

But the only explanation of how this will actually help the “fight against terrorism” is

“the tags could aid security by allowing airports to track the movement patterns of passengers deemed to be suspicious and prevent them from entering restricted areas.”

Which seems to roughly translate to

Step 1: Tag passengers electronically so you can track their movements

Step 2: ???

Step 3: Security!!

Oh, I missed step 0

Step 0: Get big fat grant from the government and impress your fellow professors

The BBC obviously don’t ask any pertinent questions.

White Terrorists White Washed

So, a BNP election candidate has been accused of possessing the largest amount of chemical explosives of its type ever found in Britain. The government held a press conference. I read it on the BBC.

The guy was charged under the Explosives Substances Act 1883 last Monday. Another guy has been charged with similar offences. Yeah, I read it in the Guardian.

It has been reported that police discovered a rocket launcher, a nuclear biological suit, chemicals and BNP literature. It was right there in the Independent.

I’m glad to see that our government and corporate media treat all acts of terrorism equally, be they committed by brown people or be they committed by white people.

Labour Party Conference Protest, Manchester

Just back from the Labour Party conference protest in Manchester. I’ve uploaded a few of the best photos but not had time for any fancy post-production. Consider these released into the public domain.