Andreas Gohr has posted a guide for creating a mobile Apache installation that could run on something like a USB stick.
Today I spent some time to figure out how to compile a relocatable Apache with PHP support. Yes, this might result in a Linux version of the DokuWiki on a Stick project. Read on for detailed instructions.
The installation is pretty similar to the normal compile with a few small differences. Check out the post for the complete process, commands and all.