Has anyone ever tried to use an iPhone as web server?
Yeah, it makes no sense to use an iPhone as web server, although the hardware could be used in some interesting ways if this would be possible. You could, for example, set up the iPhone to send a phonecall or SMS with pre-recorded message to someone who, for example, send his phonenumber through it's web interface to be included in it's address book.
Again, it's not very useful, but it would be cool to be able to communicate with an iPhone-based web server. Who knows? Maybe someone does come up with a practical purpose for this!
Solution 1:
Yes, this has been done. Here is some articles about one of the ways it has been done:
The iPhone Becomes a Web Server
iPhone ‘Personal Data Center’ Debuts in US
And this is the product:
http://serversman.com/index_en.jsp
Solution 2:
Yes, I set it up on my iPhone to serve up voicemails. It was a pain getting voicemail through WinSCP, so I made a small web interface that would let me download them by going to myiphone.local. I can also get my photos from there as well.
I used lighttpd as the webserver (you can get that from cydia), sqllite, and php to serve the pages.
The bad thing is that it only works when the iphone is on. Once its off, you can't access it anymore.
There is also a dynamicDNS app called iDNS you can use to set a domain name for your iPhone.