Hosting Websites

I've run my own server for a number of years now.

Initially it started off as a home project - I had an old PC knocking around, and decided to install linux on it and use it for extra storage. I'd been asked by a friend to get Fedora for him, so I used that. After much playing around I got it working and was able to back up some important files.

Later on I realised I could use it for websites too. I installed Apache, MySQL & PHP and configured my ADSL router to let traffic through to that machine only. I don't think I hosted anything major on it at that point - but it was a great machine for developing and running smaller sites. I also ran my mail server on it

Things moved on, I moved around, and I got a more suitable machine for my home server. I moved a few lower-traffic, lower-priority websites to it - after all, it was on my home ADSL line, so any power outages would affect it - but enjoyed playing around even more. As my knowledge of linux grew through education and work I was able to add more things and make the server better.

Eventually I had a number of sites and was becoming frustrated with the server being in my home - dropping out when the ADSL cut out, sapping our power. Looking around the various hosting options, I really wanted my own little server somewhere on the internet - and I found that with Linode. I was able to install the latest image of Fedora without a problem, and transfer everything across - my websites now run at 99.9% uptime, and I still have control over the whole server - I have a subversion server installed, I have a torrent client too. The only thing that frustrates me is the speed of development on the Fedora project - I switched to 11 in December (whilst moving the server to their new London facility) and I see 12 is out already! Fedora don't yet have that as an install option - but that's just for quick installs - you can upload your own image and do an install from scratch if you so wish.

I've done so much more with the server than I could have done with just a web host. For example:

  • When I commit a change to a subversion repository, it automatically checks out the change to a test version of the site at a private URL
  • There's another (private) page where I can update the live version of the site to the latest code in subversion without having to connect to the server directly
  • I've set up a script to read a twitter feed that allows me to update other sites and systems on the server - see Update multiple twitter accounts via SMS from one phone for more details on that

Basically... if I can think of a way to get multiple systems to work together, I can do it! See the Subversion article for more information on my subversion scripts.

I switched email away from my private server - when the server was hosted at home, it tended to set off spam filters as the mail originated from an unknown IP. When Google introduced Google Apps I switched to that, so I have Google Mail, Google Docs and Google Calendar, all unique to my domain. It's bloody fantastic and a lot less hassle than running my own mail server!

One other thing I've changed to make my life easier is switching my content-driven sites to use Drupal. Sure, I have sites with lots of scripts and large backend databases, and they will stay as they are, but sites like this one (and others I host for friends and family) are pretty much pure content, and it's easier all round to use a content management system. They can update the content when they want, and I know the site will run smoothly underneath and I won't have to fight fires all the time!

I've found Drupal a little tough when it comes to video & audio content, but the range of modules available is staggering - pretty much anything you'd want. I've even branched out into e-commerce on one site - and again I find myself back at the command line, playing around, writing my own modules to get the site to do things how I want it.

It's interesting to look back and see how far I've taken the server (and my knowledge) in the past ~5 years, and I wonder what I'll be doing with it in another 5...