You need to create a port forwarding to your Android device. This can be done with ADB.
adb forward <local> <remote> - forward socket connections
forward specs are one of:
localabstract:<unix domain socket name>
You cannot simply edit the hosts file on Android, as it resides on a read-only file system: /system/etc/hosts, see:
How to edit etc/hosts file
How to change the hosts file on android
use a DNS server like DNSMasq in your local network to take care for that "centrally"
use "root powers" to force-edit the system file as described above
The book Pro Android Python with SL4A comes with some free downloadable source code, you can find it on that official site. In the source code samples there are examples of basic httpserver, and basic ftpserver. Both of those will work on Android devices, I imagine it is also possible to make a more advanced webserver using python, or perhaps even re-purpose ...
AndroPHP looks like it'll fill your needs quite nicely.
Deply dynamic PHP content
Serve pages over LAN
Use a MySQL Database
Heck, this'd be awesome for all sorts of events. Have people whip out their phones, navigate to your locally hosted signup form, etc, then export the mysql tables out later.
Wordpress requires a database to run.
After installing KSWeb, you will need to create a database for Wordpress. To do this:
Go to Tools → select phpMyAdmin (it will install).
Open Chrome browser.
Go to localhost:8000 (to connect to phpMyAdmin).
Select the Databases tab.
In the box below the label Create Database enter wordpress, select ...
That unfortunately needs some 3rd party app, as there's no "native" feature included with Android. Apps you might wish to check for this purpose include:
AndroPHP (already described by dotVezz)
Ulti Server: PHP, MySQL, PMA includes DyDNS, FTP, FTPS, SFTP, SSH, PHP, MySQL (which also answers t0mm13b's comment)
KSWEB: server + PHP + MySQL also includes FTP ...
Welcome to the Android Enthusiasts, Majk! We support end-users with Android-specific issues, but cannot help you setting up a Linux server on a device, though it was running Android before. Still, some helpful hints:
There are means to control your device even with a broken screen. We've got several issues reported where people wanted to do exactly that. ...
You should just be able to add the port to the end of the domain as you would with a desktop browser, e.g. http://mysite.com:8888. Chrome and the built-in Browser app definitely support this as I use them in this fashion on a daily basis; I'd imagine other browsers would as well since the syntax is defined in the RFC specification.
Problem may be caused by HTTP Proxy server. Proxies help to manage web traffic on the providers end, but can and probably will disrupt access to local addresses. Proxy options may be available in your network settings, but on many phones these options are hidden. An app such as HTTP Proxy Settings will give access to the hidden settings. Simply clear out the ...
Android itself does not provide such a facility (as to my knowledge). But there are a bunch of web servers available in the playstore. A German overview on AndroidPIT sums up some of them (grouped into suitable targets): Webserver (Google Translate's English variant: Webserver).
Some examples include static content webservers like e.g. kWS - Android Web ...
As mentioned by lzzy, you can use DNSMasq server to achieve this. But Chrome uses own DNS resolving process and this method may not work.
To start the server use the following command:
sudo /usr/local/sbin/dnsmasq -d \
That entirely depends on your carrier's setup. For security reasons, several carriers (not all) block the required ports for incoming connections – so though your setup theoretically runs fine, you can't reach your services as the carrier blocks access.
I have not tried it, but in that case it might be possible working around using a VPN (some apps for that ...
Sure you can, you just need a samba server implementation on your android device (just like the PC)
Here is a full port of Linux Samba server which is very powerful: Sambadroid
This application allows you to share/manage files on your device easily from any device on your network. Simply start your mobile hotspot and let the devices connect.
Then start ...
You can run Webserver on Android for example :
but, there is 2 Case for use with Android Device :
your phone Broadband is how much ?
this Broadband can support users
and online at 24 hours of day ?
this is not good idea for start webhosting or other something with a Android device.your hardware need backup and set other ...
You could install Termux, a terminal shell with additional Linux functionality on top of Android, with a package manager, so you can scale the magnitude of native Linux functionality at will. Then enter
pkg install openssh
Key-pairs in different formats will be generated upon OpenSSH install.
The port forward app you mention won't port below 1024.
The app you require is TCP Port Fowarding. It is installed in Android. You can use it with USB adb to setup a VPN. It also is ran from user-space and root is not required.
The App your looking for is kWS. It will serve any html file you have on your phone to port 8080 (or other unused port), and it doesn't require a root.
If you want to run a custom server (i.e. with sockets), you'd need to develop your own app with sockets, although you'll need to know Java.
The clue is in the error message, which says it can't connect to the proxy server. If your device is configured to use a web proxy, then it'll never connect directly to localhost: it connects to the web proxy and asks that for the web page you really want. This won't work with a local web server.
To use a local web server, turn off your web proxy settings. ...
Try accessing your server using the address: http://localhost:8080/ or http://127.0.0.1:8080/
Those are called loopback address and should always refer to the machine running the program.
Is there any default blocking of port 8080, or otherwise noteworthy issues that could explain this port number, the local machine connection to it, etc.?
Unless your ...
No, there's no default blocking of port 8080, accessing an HTTP server from the same machine doesn't itself cause a problem, and there's no standard way to configure a server. The standard way to configure anything in Android is through the application itself, with the GUI it provides, not by editing XML files.
After trying everything you have, I'd suggest ...
Just as Izzy suggested, I would recommend going to the play store. Here is what I found:
Thats really the only one available through the google play store. I haven't downloaded it for myself so I'm not vouching for it, but it might be worth a try.
A simplistic solution to your problem would be the following:
Set up any one of the IP Camera apps on the Play store.
Access the IP Camera app's web interface via the server.
Set the web interface to record the video feed to its storage.
This would work; but you haven't specified if you own the server or not, what type of server it is, or whether you are ...
If you mean enable web server on phone - there a lot of servers on market, but for file transfer (s)ftp is more usable.
ES File explorer last versions support this, as example, or
WiFi FileTransfer, that less functional on device, but easier for use (freeware version has 4 Mb file size limit).