« Back to the top page
IDG News Service

Run a portable web server

Jason Whittaker, PC Advisor11.04.2009
Tags
Comments 0
Like the story? Get Alerts of big news events. Enter your email address

A huge variety of web services and providers are available, ranging from free online site builders to fully configurable virtual servers hosted by an ISP. For a large number of these, you'll be able to log in and create your website fairly easily, so why would you need web server software?

For a web developer, the advantage of having a server on your own PC is that you can test pages and sites before they go live. In particular, if you're working with complex scripts or plug-ins, there's always a danger that they may cause your site to stop working or create vulnerabilities.

Server2Go, which we demonstrate in the following walkthrough, can be installed on a USB drive. This means you can take your files with you wherever you go, and use them even on a PC where you have no administrator privileges and are unable to install any programs. This will be useful if you want to demonstrate a test site to someone else or simply try something out.

It's also possible to create media-rich applications that can be distributed to run from disc when you don't want them available online. If you also bundle the installation-free version of Firefox, you'll gain complete control over the presentation and distribution of your files.

Getting up and running with Server2Go

Server2Go runs without needing to install itself on your machine, which means you can launch it directly from write-protected media. Because it usually includes a fully functioning database, you can create complex applications such as catalogues and computer-based training (CBT) products that can be sent out on disc.

The program comes in a number of versions, including a micro package that consists of the web server Apache. In most cases, however, you'll want to use a version that includes PHP, MySQL and Perl to ensure you have everything you need for a fully functioning site.

Apache is the core application. The popular open-source web server could be downloaded as part of Server2Go in three different releases at the time of writing: 1.3.55, 2.0.63 and 2.2.11. The first two versions are stable but older forms, while the latter is a more recent release.

Database functions are handled by the open-source MySQL program, with which many web developers will be familiar, along with the less commonly encountered SQLite. This allows databases to be run without installation or administration. Finally, Perl and PHP are popular coding languages required to run a large number of interactive sites. PHP is particularly useful alongside MySQL for handling databases, with Server2Go supporting PHP 5.2 and MySQL 5.0.41.

It's possible to tinker around with various settings within configuration files after you've downloaded Server2Go. We'll do a little of that here in order to ensure that the program runs alongside another portable app, FirefoxPortable.

In general, however, one of the best features of the package is that it runs effectively and efficiently with no further requirements on your part.

STEP 1. Download the Server2Go software from server2go-web.de. Click Downloads and select a version. We recommend the most complete package, but you can opt for a download of between 6MB and 45MB.

STEP 2. Server2Go downloads as a self-extracting .zip file. Double-click this. Once its contents have been extracted into a new folder, have a nose around and familiarise yourself with the various folders.

You'll find an icon that launches the program and six folders. Server contains the applications that will run your web pages, dbdir handles databases and cgi-bin stores executable scripts. See Using phpMyAdmin (below) to learn about the Admin folder. Htdocs is the most important folder: this is where you'll store the web pages you create.

STEP 3. To begin using Server2Go immediately, double-click the main icon to launch the web server. This will open your web browser with the address http://127.0.0.1:4001 - a test page that confirms you've unzipped the package correctly. To open any other files in your htdocs folder, type the name of


Post new comment

The content of this field is kept private and will not be shown publicly.
Respectful debate is welcome, but comments that are defamatory, indecent, abusive, or in violation of any law will be removed.