Skip to content
Advertisement

Android linux deploy (localhost LAMP server configuration)

Hello my fellow humans!

I have two rooted android phones, each running a chroot environment using the “Linux Deploy” app (HTC desire 510 running Kali Linux and vodafone smart 4 mini running Ubuntu). On each device, I have installed LAMP using:

JavaScript

When I start apache2 service, the server says that it has started using ServerName 127.0.0.1. However, when I do nmap -p 80 127.0.0.1, the port is closed. Netstat shows no process using port 80 and my fingers are violently bleeding from playing around with iptables all day. Changing the listening port in apache configuration doesnt seem to work either. Perhaps it is something to do with iptables in the Android kernel? I am simply trying to get this webserver available on port 80 of the phones LAN address. I am totally stumped, any help at all will be greatly appreciated!

Linux Deploy: https://github.com/meefik/linuxdeploy

apache2.config (ubuntu environment)

JavaScript

netstat results (ubuntu environment)

JavaScript

ports.conf (ubuntu environment)

JavaScript

Advertisement

Answer

I’ve also got a Linux install on an Android tablet using Linux Deploy and also have a LAMP stack installed, so am in a similar position to you. The version of linux that I’m using is Debian Wheezy however so there may be some variation from your exact situation.

Firstly (and I doubt this makes any difference) I installed using “apt-get install”.

Then I edited /etc/apache2/sites-enabled/000-default to enable the localhost and other LAN clients to connect.

JavaScript

I’m pretty sure that was it! I’ll contribute further if I remember any other setup steps that I had to do.

The other difference between our two setups could be the version of Android. I’m running CyanogenMod 12.1 (Android v5.1.1) on my tablet, though I’m not sure that this is the cause of your problem.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement