In previous post, I’ve shown you how to make the USB flash drive to be a local portable web server with Server2Go.
Now, I’ll show you another alternative to make your USB flash drive to be a portable web server with the more established (and rather widely used) XAMPP.
Before that, let me make a quick comparison on the pros and cons between XAMPP (Portable) and Server2Go. A quick question – if you want me to decide and can only use one to be my local web server solution, then the quick answer and selection will be … XAMPP. By Apache Friends, XAMPP is more established and maintained. XAMPP’s website is also more professional while Server2Go frontpage looks kind of amateur. One major put off, at least for me, is that on Server2Go’s Features tab, compatible browsers include IE 6 & 7 – c’mon, that was like several years back. Hence, in terms of sustainability and support, I’m now more leaned toward XAMPP.
As the main objective is to make the USB flash drive to act like a portable web server, I’ll be using the more lightweight version XAMPP Lite – to be more exact, XAMPP Lite seems to be phased out. It’s now known as XAMPP Portable.
So, let’s start to step by step procedure to transform your USB flash drive to a versatile and portable localhost.
First, of course, download XAMPP Portable from https://www.apachefriends.org/download.html and click on the highlighted “here” link to see all the versions of XAMPP on SourceForge :
Download the xampp-portable. I’d prefer to download the .zip file to avoid any issue of downloading/installing .exe.
Unzip the .zip file and you’ll have a xampp folder. Copy/upload the entire xampp folder to your USB flash drive (I’m using the 8GB USB2.0 flash drive which is more than adequate to be a local web server).
Double-click xampp-control.exe and start both Apache and MySQL.
“Allow access” (for Apache and MySQL) if your firewall pops up any message.
Done. Your local web server is up and running! Just start up your (any) browser and you can access your front page at https://127.0.0.1
The public directory is under htdocs – the frontpage that is showing up at 127.0.0.1 is the index.php at htdocs directory.
You can upload any .html (HTML5) file there and it’ll show at your localhost (127.0.0.1).
So if you compare this setup with Server2Go where you still need to edit the pms_config.ini to prevent shutdown issue and to include the :4001 when accessing localhost, XAMPP is “cleaner” and straightforward.