Blog: Compatibility

Getting a Web Server to Run on a USB Drive
professional hacker

Focusing on Functionality and Compatibility

Focusing on Functionality and Compatibility

Recently we put a disaster preparedness kit that acted as a Drupal website on a usb thumb drive for the American Institute of Architects’ Communities by Design Initiative. This meant getting the entire Apache+php+MySQL stack running from the usb drive and essentially acting as a web server on a stick. Installing a web server is almost never as simple of a task as you'd expect no matter how often you do it, especially when it needs to be set it up on the fly from any computer. 

There are several platforms that thankfully provide fully contained web server environments that make this process much easier. Among us Mac developers MAMP is very popular, and on the Windows side platforms like XAMMP and the Uniform Server work well. For this project we started from XAMMP, and it got us fairly close right out of the box. However, there were some drawbacks – it was big, and it assumed some things we didn't like. So we made some performance tweaks, most importantly enabling and configuring a php cache, to speed things up. We also created some additional nice features like custom start up scripts and icons. With this, the server was set up for Windows users.

Here is a screencast showing how it runs off the stick. I’ll explain how we did it here to hopefully save other developers some time below.Drupal on a Stick