Tuesday, 24 March 2009

Run, or develop and test local web applications using a local web server

These days, web applications are a dime-a-dozen. That's because they really are quite easy to build and have replaced the likes of proprietary, platform specific solutions such as Visual Basic.

The issue that this raises is: What happens when you might not have access to the Internet (or intranet)?

No access to your application is what happens.

Now, you can install a full web environment on your desktop or laptop. Typically these are referred to as "LAMP" (Linux, Apache, MySQL, PHP/Python/PERL) or "WAMP" (Windows, Apache, MySQL, PHP/Python/PERL) stacks. Great, now you have a fully fledged web and database server running on your day-to-day computer. You may already have spotted the possible issue. Such a heavyweight set of applications can seriously impact the performance of you PC.

Fortunately, you don't have to run such a large stack of software. You might not be able to get round the need for MySQL although SQLITE is a good choice for single user and small system projects if you have the chance to choose what database you are using.

For the web server though, you would be much better off chosing a lighter weight one (unless you absolutely have to have some advanced feature that only Apache can provide). I've provided a short list here, it is not exhaustive by any means, just ones that I've looked at for my own use - they are all free to use so no need to worry about costly licenses.

Personal Web Servers that work on both Windows and Linux

These two work on both Windows and Linux.

  • Mongoose Web Server
    This is a really lightweight server but is still a reasonable choice. It only uses a megabyte or so of memory, supports SSL connections and uses CGI to link in with PHP, etc. Sadly, documentation is very thin on the ground but it isn't difficult to get going.
  • aEGiS NanoWeb
    This has more features than Mongoose such as URL rewrites and interestingly is written in PHP itself. It doesn't support SSL directly though and uses more memory than Mongoose - around 10-15 Mb.

Personal Web Servers for Linux

  • LightTPD is perhaps the best known and well featured lightweight web server for Linux.

Personal Web Servers for Windows

There is a real shortage of good, free, lightweight personal web servers for Windows but in addition to the above two, here another possibility.

  • Windows IIS
    The personal version of this heavyweight web server comes free with most if not all versions of Windows desktop. You'll need to dig deep to find it though. Go to Add/Remove Programs in the Control Panel and then to the link that installs Windows Components. I don't personally use this as I don't like propriatory services that try to lock you in, it is free though and fully featured. It also gives you access to ASP and ASP.net.
  • Lighty2go
    LightTPD for Windows packaged with MySQL and PHP.

My own choice is to keep both Mongoose and NanoWeb configured to use the same PHP instance and web root folder. I run Mongoose for most simple things and switch to NanoWeb if I need some of the features.

Technorati : , , , , , ,
Diigo Tag Search : , , , , , ,