[Android General] - Swift -:
Android Webserver / Webhost!

(This is taken from my blog article, if you want to see the article itself, click this link)

http://shanehastings.com/Blog/2012/08/host-a-website-from-any-android-device/

-------------------

So, if you're a web designer or HTML, PHP coder etc you'll know that paid hosting isn't cheap, and free hosting is too limited and un-reliable.

However, until recently there was no such thing as "portable hosting", free portable hosting that is (not that I know of any paid portable hosting?)

I've found a way to host any HTML (PHP & MySQL too!) website with images and Java Script support all from your Android device!

Now, this may seem un-reliable, but with a clean install of a ROM / Firmware with just the required app, and a charger plugged in, this is a pretty reliable hosting source.

However, I doubt you're going to see Google running from this any time soon, or any major website for that matter! Another factor of why you'd want to do this is, "simply because I can".

Some other good uses for this project are:

If you're still interested, let's get on with the tutorial!

What you'll need:

If you've got all of those then you're ready to start!

- #1| Download "Boa Webserver" from Google Play.

https://play.google.com/store/apps/details?id=com.applications.boa&hl=en

- #2| Creating the directory

Using a file manager, create a folder and call it whatever you want. For the sake of demonstration, I will call mine "Electronics Website".

- #3| Adding Content

Now, we've got our directory but we need some webpages! Simply paste the HTML files into the directory you just created. You can create more directories inside the main directory (/sdcard/YourFolderName/)

- #4| Setting the default directory

Now, this is where we have launch "Boa Webserver".

Once the app is open, simple press "Menu" and then "Settings". Here we have the option to change the port in which Boa will broadcast on, and the directory to use as default.

This is what we want, so click on "Share Directory" and add the directory you created earlier.

- #5| Starting the Webserver / Website!

Starting the webserver / website is very simple. On the main screen of the Boa Webserver application, hit "Start Webserver".

This will start the webserver.

- #6| Viewing the website

When you start the server, Boa will tell you what the LOCAL IP is, this is located in the orange box at the top of your screen.

As you can see, when I goto the IP that is shown in the "Boa Webserver" app, I'm brought to my website!

PC:

Boa Webserver, showing the IP & Log:

- | A Note About Portforwarding

As many of you will know, to make your website available for the whole world to view you will need to portforward the port that Boa runs off of and also the IP in which your Android Device is connected to via your Wi-Fi (192.168.1.2, 192.168.1.3 etc)

You do NOT have to port forward if you are using this for private use (household use, people connected to your Wi-Fi)

- | Need PHP and MySQL?

No problem! Just use KSWeb Server instead! Same procedure, different app!

https://play.google.com/store/apps/details?id=ru.kslabs.ksweb&hl=en

- | Thanks for reading, hope you learned something.