Thursday, April 24th, 2008

Moving Hosts

I am in the process of moving this site to a different hosting provider. I would love to stay with my current host, but this site is fast outgrowing the services I have available; I need to move the site now, before I start incurring additional fees from my provider :| This is a real shame, because the site's current host has proven to be super reliable.

I'll be moving the site to a cheaper service, one which offers a greater amount of monthly bandwidth. I know the service/uptime will not be as good as the current host, but for the difference in cost, I will not be complaining.

Anyhow, I just thought I would mention it as things may get a little screwy around here over the next few days. BTW, if you are reading this, you are connected to the new host :)

Tagged with: hosting | Comments [6]


Tuesday, December 4th, 2007

Gmail as Default Email Client in Ubuntu

January 7th '08 - Problems/Issues
There are some issues with this script that could potentially lead to a temporary loss of access to your Gmail account. Please see the user comments for more details.


The How-To Geek has posted some really useful instructions for setting Gmail as the default email client in Ubuntu. How-To Geek starts his post by saying:

Every Geek uses Gmail… it's pretty much required. And now you can set Gmail as the default client in Ubuntu without any extra software.

I think his opening statement is a slight generalisation :) Having said that, I am indeed a geek and I do use Gmail so he may have a point! Anyhow, I followed the instructions and the hack works well. I did deviated slightly and placed the shell script in my bin directory; this way the script can be called by name as it sits within my system path. For future reference the script I used has the following content:

#!/bin/sh

firefox -remote "openurl(https://mail.google.com/mail?view=cm&tf=0&to=`
echo $1 | sed 's/mailto://'`,new-tab)"

Note: The Firefox command actually sits on one line.

Once I'd placed the script in my bin directory, I then simply needed to change my preferred mail application:
System -> Preferences -> Preferred Applications

Setting default mail client in Ubuntu.

When email is slower than snail mail

Talking of Gmail and email, I've been experiencing some technical issues with email across several domains. Apparently these issues stem from Gmail greylisting one of my hosting providers mail clusters. You can't imagine, unless you've experienced it, how frustrating it is to receive email more than 48 hours after it was originally sent.

I apologise if anyone is waiting on a reply from any messages sent between 30/11/07 and 03/12/07. Your message will probably never arrive at its intended destination; I can only imagine that your message is floating aimlessly around cyberspace, either that or it's been sucked into a black hole :(

Looking on the bright side, I also use another more reliable [read more expensive] hosting provider and I've moved my email operations to their servers. I've also been looking into using Google Apps for all my email needs; however, I'm slightly apprehensive about paying out on a service that has been in Beta status for more than 3 years. Does anyone have any experience of using this service? If so I'd really appreciate some sensible feedback about it.


Saturday, November 10th, 2007

Server Migration

Today has been a busy day. As well as running my personal campaign of terror, I've also moved this site "crunchbang.org" to a new hosting provider. The new server has a whole host of goodies for me to play with and I'm really quite excited about it. Also, the new server runs Debian as opposed to CentOS — as an Ubuntu user I feel much more at home using a Debian system.

Hopefully there shouldn't be any noticeable disruption to my site. Having said that, if you do notice anything funky please do let me know. Thanks.


Friday, November 2nd, 2007

Image Hotlinking Prevention with .htaccess

I'm designing some banners and buttons for Ubuntu advocacy. I have no problem with giving the images away [indeed this is why I made them,] however I really can't afford to host them. So before I post them to this site I wanted to ensure that I had some hotlink protection in place.

To accomplish this I've created a new directory under my site's default "images" directory and protected it from hotlinking with an Apache .htaccess file. For future reference here are the contents of the .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?example.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png)$ ../hotlink.gif [L]

The first line of the above code turns on the mod_rewrite engine in Apache. A requirement for the rewrite commands.

The second line matches any requests from the URL example.com [change this to suit your requirements]. The [NC] code means "No Case", meaning match the URL regardless of case.

The third line allows empty referrals.

Finally, the last line matches any files ending with the extension jpeg, jpg, gif, bmp, or png. This is then replaced by the hotlink.gif file [see below] residing in the above images directory.

An example no hotlinking image with message.

If you need to allow more domains to hotlink to your images you can simply duplicate line two. See the example below:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?example.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+.)?another-example.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+.)?one-more-example.org/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png)$ ../hotlink.gif [L]

Monday, October 29th, 2007

PHP 5 & Feed Updates

It's been a long time coming but my website [CrunchBang.org] is now finally running on PHP 5. My hosting provider performed the upgrade earlier this month and made the switch optional on a domain basis. Any domain on their servers can run either PHP version 4 [default] or upgrade to version 5 by adding a script handler in .htaccess:

Action php5-script /interpreters/php5-script
AddHandler php5-script .php

My development systems all run PHP 5 so the switch was a breeze. Hopefully from now on I'll be able to avoid stuff like this.

Also, I've been working on my Whird project over the weekend. I've now added feeds for individual tags and updated various features to improve usability. I've had to place some URL rewrites for the new feeds and I'm hoping that the various planets [Planet Ubuntu Users, Planet Ubuntu UK] don't get flooded — I apologise if they do :)


Friday, October 5th, 2007

United Hosting Server Upgrades

My hosting provider is currently performing upgrades to all of their servers. I've been with United Hosting for about 4 years now and I can honestly say that they are the best hosting provider that I've had the pleasure to use.

In the time that I've been with them they have grown enormously and have an obvious commitment to constantly improving their services. I can confidently expect no downtime during this upgrade. It's a nice feeling when you have complete confidence in your host.

Note: I wouldn't normally plug commercial services on my blog. However, respect where respect is due!


Browse Posts by Tag

13th advocacy antispam artwork bash bbc bcs bittorrent bloggers blogs boobs bookmarklets cli code colour commands comments conduit crontab crunchbanglinux debian design development email fluxbuntu fonts fun gedit gimp gnome google gos hack hacks hardware hosting images javascript language launchpad licenses life lincslug linux lugradio madness meme memes microsoft mint misc monkeys motu muppets mysql n95 networking nokia openbox openoffice opensuse packaging penguins php phpmyadmin podcast ppa printer progbox programming projects puppy python random rants realplayer revu scripts security shell software ssh terminal terminator themes tools twitter typography ubuntu ubuntucse unitedhosting video virtualisation webcam webdesign whird wiki windows woot xfce4 zombies