Now for the web server on a USB key!

James Bannan
10 December 2007, 6:41 AM


How does the idea of a full-featured portable web server in your pocket strike you?


Web apps are great, except for one thing -- they only run on the web. That means you can't use them for development of interactive CD-ROMs, or standalone PCs.

And if you're a web developer stuck behind a restrictive corporate firewall, or you simply want to test applications on your PC before uploading them to your website, it can be a hassle to set up a local webserver.

So, how do you like the sound of a fully portable, standalone web server which will run from a USB key, local folder or CD-ROM with no installation? Server2Go is for you.

Server2Go is a fully-featured web server based on the WAMP software combo (Windows, Apache, MySQL, PHP). It was originally designed for distribution on CD-ROM, the primary advantage being that it runs entirely in system memory so there’s no need to write anything to the source media or host operating system.

It works by opening port 4001 on your computer's local loopback IP address, so the web content is always delivered via http://127.0.0.1:4001.This has the added advantage of completely bypassing IE7’s Local Machine security zone, which is far more restrictive when it comes to accessing web content from a file-based source. So problems like blocked Javascript and other ActiveX controls are no longer problems.

Server2Go comes in a few flavours, depending on your needs. The basic package contains PHP 5.2.3 and SQLite. More advanced packages also contain MySQL 5.0.41 and Perl 5.8. All packages are available for both Apache 1.3.35 or 2.0.58 (all versions are current at the time of writing).

Depending on the sort of web app you’re building, there are also installable modules for downgrading PHP to 5.0.5 or 4.4.7, and MySQL to 4.x or 3.x.

The contents of the Server2Go package simply extract to form a ready-made web folder structure. All the files you wish to serve go in the \htdocs folder. Launch Server2Go.exe in the root and that’s about it.

Server2Go launches IE regardless of what other browsers you might have installed, and whether or not it’s the default. This does mean that from a developer’s perspective, the environment you’re coding for is very well defined which certainly makes life easier.

However, other browsers can access the web content via port 4001 while Server2Go.exe is running. When the primary IE window is shut down, the EXE automatically unloads from memory. That makes it less of a security risk -- if the browser isn't running, neither is the web server, which means it's less likely to be a hacking and malware target.

The file structure is geared around an autoloading CD-ROM, so it contains icon files and an autorun.inf file. This structure works just as well on any media, however, and Windows can make use of autorun.inf files on removable media like USB keys.

An important thing to note though, is that the reliance on Internet Explorer, autorun.inf and EXE technologies means that Server2Go is restricted to Windows-based operating systems (Windows 98 and above).

Of course, an application usable on over 90% of the world’s computers can hardly be said to be burdened with “restrictions”.

OS X and Linux users can still access the web content manually via the \htdocs folder on the source media, but this will be served locally rather than via local IP, and they won’t have access to the server applications like MySQL or PHP.

Server2Go is DonationWare – it’s free for personal use and personal distribution, but if you’re distributing it commercially the author requests a small donation (around 10 Euros) towards supporting the project. In other words, it’s left up to your own conscience. However there are distinct benefits to making a donation.

Silver Donation Level (10-39 Euros) gets you the latest version of SimpleBrowser – a stripped-down browser window with no controls which is also configurable, and CD-ROM Catalog, which is a PHP script developed by the author which dynamically reads local folder content and is configurable via PHP.

PHP CD-ROM CatalogPHP CD-ROM Catalog


Gold Donation Level (40+ Euros) gets you access to the Silver Level software plus the latest development release of Server2Go, as well as Server2Go Configurator, and program which lets you make some basic changes to the program executable as well as unlocking some basic MySQL admin features.

I’ve used Server2Go myself for a distribution of 250 DVDs, and I can vouch that it’s one of the easiest applications I’ve ever used, provides a terrific solution in a niche area of web development and is a must-have tool for anyone interested in web coding.


Post your comment



Comments

RSS feed Email alert

Anonymous-:

theres also XAMMP:
www.apachefriends.org/en/xampp.html

29 February 2008, 8:32 PM (4 years ago)report abuse Send to a friend reply

Anonymous++:

No, XAMPP requires installation and XAMPP Lite is not designed to run from a CD as the server requires write access to some of its files (e.g. log files). In addition, XAMPP is a development environment, certainly not suitable for production, and requires manual configuration. Server2Go is designed to be deployed on portable media; for example, when demo'ing a website to a client.

29 February 2008, 8:49 PM (4 years ago)report abuse Send to a friend reply

pril:

well there is POW webserver really awesome runs with fire fox and can run off a usb too you can use it as a plugin in firefox or u can use it in stand alone mode no installation required thats the plus side but on the negative side the languages suppourt is limited and security wise heheh e id rather not talk about it its great for home users .

29 February 2008, 8:49 PM (4 years ago)report abuse Send to a friend reply

Anonymous-:

sorry, my mistake

29 February 2008, 8:49 PM (4 years ago)report abuse Send to a friend reply

anonymous user Anonymous user