indiankidI ran across a webserver called Cherokee a week or so ago while looking around for “light” alternatives to Apache on VPSes.  It looked pretty nice, so I downloaded it and compiled the latest version 0.99.9 and started it up.

The nicest thing, I think, about this server is the simple Web configuration UI (cherokee-admin).  When you start it, it generates a one time hashlike password that you then use to log into the web config.  From there, you can configure virtually (no pun intended) all aspects of the web server, including virtual hosts and many other settings.

The reason primarily for my use is serving up my static HTML sites and light PHP ones as well, light meaning minimal DB calls for things like contact form entry, single simple “SELECT * from where whatever = whatever” type querys with small recordsets and so on.  I moved about 20 of my customer sites to it and so far so good.  That is the level of confidence I had in Cherokee.  100% stable so far.

Compiling it from source may not be everyone’s cup of tea, but it really isn’t that difficult.

Here’s how I did it from a new VPS.

apt-get install nano htop build-essential mysql-server php5 php5-cgi php5-mcrypt php5-mysql gettext

This installs nano (a simple text editor), htop (top on steroids), build-essential which is a meta package containing necessary packages to compile crap, mysql, PHP, a few extensions and gettext which the ./configure told me it needed and I’m surprised it wasn’t part of the build-essential.

If this is a fresh ubuntu build, you’ll probably get a locales error… Use this to correct.

sudo locale-gen en_US.UTF-8
sudo /usr/sbin/update-locale LANG=en_US.UTF-8

Download the latest cherokee source.

Untar it and enter the folder.

Now run these commands, modify the paths to your liking.  This runs the pre-compile config, makes then installs it, it then copies the init script to that folder and changes the permissions to allow it to execute.

./configure –localstatedir=/var –prefix=/usr –sysconfdir=/etc –with-wwwroot=/var/www
make install
cp contrib/cherokee /etc/init.d/
chmod 755 /etc/init.d/cherokee

to Autostart the init script on boot… Run this…

update-rc.d -f cherokee defaults

That’s about it, read the documentation for specific information on features and have fun.  It is a VERY fast and light webserver that is very well suited for basic websites running on minimal memory VPSes.