Do you know that from your Android phone you can host a web site and share files while you're on the go without emailing the files? Both of these tasks are possible with the help of the tiny kWS web server from Xeus Technologies.
Image credit: Xeus Technologies
kWS is incredibly easy to install, and it takes very few CPU cycles. Here's how to get the kWS server installed and running on your Android-based mobile device.
Follow these steps:
- Open up the Android Market tool.
- Search for kws.
- Install the application.
The web server is now installed and ready to run.
Starting the application/server
The first thing to do is open your applications window (where this is will depend upon the phone you are using) and fire up the kWS application. In the default screen, you will see a button at the bottom of the window marked Start Server; if you want to dive in, go ahead and hit that button. If you do hit the Start Server button, you will see a log file fly by. Within that log file you will see lines like, [24-Aug-2010 12:52:38] http://IP_ADDRESS:8080, where IP_ADDRESS is the actual IP address of your phone.
You can then fire up a browser, point it to that IP address, and see what you have on the server. More than likely, you will not see anything. If you see FORBIDDEN: NO directory listing, this means you have not enabled directory listing on your server, and there is no index file on your document root. If you want to enable directory listings, follow these steps:
- With kWS open, click the Menu button.
- Click the Settings icon.
- Enable Directory listing.
When you do this, and you reload the web page, you should see a listing of the directories and files on the server.
Create your mobile web site
To serve up a web site on your phone, you need to install a text editor in order to write the HTML; a good editor for this purpose is TxtPad Lite. You could also create the pages on your machine, mount your phone, copy the files to the SD card on the phone, and then point your browser to the phone. Make sure you create an index.html page to serve as the launch pad for your web site.
If you are so inclined, you can also set up authentication for kWS. To do this, go back to the Menu and click Settings and then scroll down until you see Authentication. In the Authentication section, you have three options:
- Authentication: Select the type you want (None, Basic, Digest).
- Username: Create the username for authentication.
- Password: Create a password for authentication.
The above is especially critical if you plan on serving up any sort of sensitive data, or you are concerned with any data on your phone slipping into the wrong hands.
Image credit: Xeus Technologies
If you won't want to have to remember your IP address, you can always take advantage of a service such as dynDNS or no-ip.com so that you (and others) can reach your phone. When you do, make sure you configure this within the kWS settings. If you do configure it on your phone, you are sure to get your IP address updated if it should change on your phone.
Battery life, CPU drain
I was really quite surprised that kWS does not drain your battery or hit your CPU too hard. Although, if for some reason your little mobile web world starts getting a ton of hits, you can bet your battery will drain and your CPU will spike.
The practical application of this is not obvious. But there are those of us who like to flex our geek muscles (I, for one, find joy in this), we do it because we can. I bet that if you really dig deep, you will find a reason to host a web server on your Android phone.
What do you think? Is there a reason to serve up "mobile you" to the world? If so, why?
Jack Wallen is an award-winning writer for Techrepublic and Linux.com. As an avid promoter/user of the Linux OS, Jack tries to convert as many users to open source as possible. His current favorite flavor of Linux is Bodhi Linux (a melding of Ubuntu and Enlightenment). When Jack isn't writing about Linux he is hard at work on his other writing career -- writing about zombies, various killers, super heroes, and just about everything else he can manipulate between the folds of reality. You can find Jack's books on Amazon, Barnes & Noble, and Smashwords. Outnumbered in his house one male to two females and three humans to six felines, Jack maintains his sanity by riding his mountain bike and working on his next books. For more news about Jack Wallen, visit his website Get Jack'd.