Has anyone ever tried to use an iPhone as web server?
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