How to easily install a web server on an Android device

If you’ve ever wanted to install a web server on your Android device, you’re in luck. This walkthrough explains how to install and configure the Apache-powered HTTP server.

Image: Jack Wallen

From the desktop of “We’re doing this because we can” comes the ability to run a web server on an Android device. But it’s not just any old web server – it’s an Apache powered server. The server in question is HTTP server powered by Apache and it can be found on the Google Play Store. This server is based on Apache 2.2 and does a great job of serving websites from your mobile device.

Of course, you ask yourself, “Why do this? The truth is, there aren’t a lot of good reasons, other than to show you can. But there’s the idea of ​​having a mobile web server in your pocket that you can test development on. What better way to learn how to build basic websites than with a pocket server! Whatever your reason for wanting it, I’ll show you how to install it and run a basic website on your Android device.

SEE: Android Pie is here, first on Google Pixel phones (CNET)


The installation is pretty straightforward. Just follow these steps:

  1. Open the Google Play Store on your Android device.
  2. Find the HTTP server.
  3. Locate and tap on the entrance to Tautvydas Andrikys.
  4. Tap Install.
  5. Let the installation complete.

Once the installation is complete, you will find a launcher for the app on your home screen and / or your app drawer. Tap the launcher to open the app. When you run it for the first time, you need to download and install a version of Apache (Figure A).

Figure A

Figure A

Download the Apache version of your choice.

To download the version, press the download button (arrow pointing down). When the download is complete, tap the name of the download to create it. Once the download is complete, the main screen will be displayed.

SEE: Job Description: Android Developer (Tech Pro Research)

Configure and start your server

In the main window (Number B), press the edit button for the server address and port.

Number B

Number B

The main window of the HTTP server.

In the resulting pop-up window (Figure C), tap to change the port (if necessary) and tap the Server address drop-down list. From the list of possible addresses, you can select an IPv4, IPv6, loopback, and all-network address.

Figure C

Figure C

Configure your port and IP address.

After configuring your address and port, press the Edit button and you will return to the main window. Press the START SERVER button and your web server is now operational. Point a browser to the IP address you chose (assuming your Android device is on the same network as the desktop computer you will be testing it with) and the default index page will appear (Number D).

Number D

Number D

The default index page for the HTTP server powered by Apache.

When you are ready to add your own pages to the server, place the files in the server document root in / storage / emulated / 0 / htdocs. If your device does not include a file manager, you will find several on the Google play store. Or you can always install a good text editor (like a free writer) and develop directly on the device. Either way, your web server is ready to go.

SEE: Serverless Architectures: 10 Serious Security Issues (Free TechRepublic PDF)


It won’t make you more productive on your Android device … unless your goal is to hone your HTML skills. But whatever your reasons for installing this web server on your Android device, have fun with it.

Read also…

Your thoughts

Does this sound like an interesting project or will you skip it in favor of more practical tasks? Share your perspective with other TechRepublic members.

Source link

Comments are closed.