Web On Key

My stuff for PmWiki · Dom's Home · Miscellenaous Things

…or how to have an Win32 Apache2 PHP enabled web server alive on a USB key. With minor configuration tweaks, it also could be embedded on Read-Only media.


  • A writable medium with at least 50Mb free (128Mb recommended),
  • Binary distributions of:
    • Apache 2.2.4 (or higher),
    • php 5.2.1 (idem).
  • The WebOnKey archive of spicy config files and startup script

you'll get here: Attach:WebOnKey.zip.

Quick Start

  1. Expand the application distribution archive to get the following directory tree:
       |   |-apache22
       |   `-php5
  2. Then extract each binary distributions into their relevant root directory.
  3. Optionally, edit the different template files located into the config sub-directory tree and used to generate apache/php real configuration files.
  4. Use the HTMLApplication script WebOnKey\Apache-monitor.hta to start and stop Apache as a console application.


  • WebOnKey Apache-Monitor is an HTML Application able to start, stop and monitor an Apache2/PHP5 web server located on any removable media such as USB key disks.
  • When launched, Apache-Monitor first determines its current storage path (ROOTDIR) and defines some environment variables according to the location found.
  • Then, it generates Apache and Php suitable configuration files from templates, by replacing variables tags %<variable_name>% with computed values, and lastly run the server as a console application.
  • Application window offers a 3 parts splitted zone displaying current script status and running apache logs.


Runs successfully on 2000/XP and with some restrictions on 98/Me (unable to send appropriate key sequence to terminate the server).

Require Internet Explorer and Windows Scripting Host.


* major redesign to handle (future) apache 2.2 configuration files
- dropped not-so-useful edit button.
+ improved speed with internal string manipulation tweaks.

+ added support of script configuration file for easy configuration.
+ links opened with the user default browser.
+ now able to open an url when the server is started.
+ new reset button to force config. files generation (useful after
  moving directory structure).
+ new option to auto-minimize when the server is (re)started.
* internal code cleaning.

* minor message tweaks.
+ config files regenerated if needed from templates according to
  last modification time (faster startup).

* minor visual tweaks.
+ new restart button.
+ visual handling of notice/warning/error/alert in error/access
  logs (both apache2 and php messages are handled).
+ apache log files may be deleted via erase buttons when server
  is not running.
- fixed some ambiguous error messages.
+ handling of a php sessions directory (may also be purged at
  server stop).

* first public version.


The software is freely available under the GNU Public License and may be downloaded from above link.