Back in 2009, anynone with a Nokia could have a personal website running on their own phone. Sadly this amazing piece of tech was never widely adopted. Today’s phone are far more powerful than those Nokias both in performance and battery backup and still we don’t see anyone running a server on their phone. Why?
I think this was never implemented on phones because there’s no incentive for large corporations to work on something like this.
I just found ServeIt on fdroid. I tried it with a simple html website and it works on my phone. It does exactly what you ask.
Does it run on port 80?
On my non-jailbroken phone it doesn’t. The default port is 8888 and you can change it, but it doesn’t start if you specify 80. I don’t know if jailbreaking allows that.
I have to add that it shouldn’t matter much though. If anyone is around you, which would be the main use case, it provides you with a QR code that they can scan and view your website.
Yeah and if you really want it to be accessible from WAN, just forward port 80 on your router to the phone.