+ 2
How to Turn an Android Device into a Web Server
setting up a web server on yourAndroid Device
6 ответов
+ 4
Full stack in an ARM-Linux environment:
Install Linux Deploy
https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy
Install any Linux distrubution (Kali, Gentoo, CentOS, ... there are many there)
Connect to the shell or VNC (for a GUI)
Install your webservers and whatever else you want - this is a true Linux distro
Enjoy your new linux system
Notes:
This runs inside Android so the concept of runlevels doesn't really apply; some things that expect init.d won't work quite right but there are many alternatives
For example, if you can't get something in Apache going Nginx works fine.
You need a device with lots of storage space available (4GB) but you will end up with a Linux system that's running on ARM (and so can compile natively there)
It runs as a service so will work while you do other things.
I believe networking is set up for you, but if not it's trivial to configure.
If you go this route post a follow-up question:
The author might be busy
There are some remote desktop apps that make "clicking" the X/Gnome/whatever desktop much easier
You can use this to host apps like SugarCRM (PHP), MongoDB, etc.
+ 3
Native app with PHP plugin:
PAW Server for Android (Fun2Code)
https://play.google.com/store/apps/details/?id=de.fun2code.android.pawserver
This is in beta.
Instructional:
http://www.makeuseof.com/tag/turn-android-device-web-server/
+ 3
Servers Ultimate for Android (trial / not free)
This would be a way to reuse an old device (no root required) or for some unique purpose.
https://play.google.com/store/apps/details?id=com.icecoldapps.serversultimate
Has about 60 services like email, NTP, DNS, http proxy - including web, PHP, etc.
+ 2
Python web server (to serve static files in a directory):
Install QPython3
https://play.google.com/store/apps/details?id=org.qpython.qpy3
Start Console
Press Ctrl-C (KeyboardInterrupt)
Press Ctrl-D (Ends stream; the Ctrl-C from previously will now fall through and stop the script)
You'll drop to a prompt (Android terminal) within QPython3's context
$ python-android5 -m http.server 12345
Serving HTTP on 0.0.0.0 port 12345 ...
Notes:
Ctrl-C stops the server
Ctrl-D exits the terminal (or type exit and press enter)
Use a port higher than the Android/Linux privileged ports or you'll get an access violation
pwd will 'print working directory' so you know where you're serving files from (cd to change dir)
+ 2
I wrote a blog on this:
https://code.sololearn.com/Wx3SQB1D9p42/?ref=app
+ 1
you can download an app called bit-webserver from Google playstore and its free