Use jailbroken iPhone as webserver
Download ios-lighttpdphp-mysql from the repo https://cydia.angelxwind.net/ and turn on the server in settings. Then open 
http://localhost in Safari and your iPhone is now a webserver with PHP and mySQL.

This should work on all iOS versions and devices.

Source