I've managed to compile a small native web server for Android (but for now only tested on Sony X10 with 2.3.3 version). You will need root.
The main advantage is that you can quickly share photos / documents from your phone as long as there's WiFi available. The other phone needs just to have WiFi and a browser.
It is an Android port of the webserver source code found here: http://www.jbox.dk/sanos/webserver.htm which comes under BSD License.
webserver – Android binary
LICENSE – initial BSD License
android_port.patch – BSD licensed patch for webserver.c
README.txt – description on how to install / compile.
Since most mobile carriers block incoming traffic, you won’t probably be able to access your phone via GSM/3G data connection, only over WiFi.
You need to unpack the archive, and extract the webserver binary to a directory of your choice. Then:
adb push webserver /sdcard/ adb shell su cd /system/bin cp /sdcard/webserver . chmod 755 webserver ./webserver -u <username> -p <password> -s <port>
If you run in Terminal Emulator, just send it a Ctrl-C and it will exit.
Starting up the webserver (runs by default on port 80) and navigating to /sdcard/DCIM folder in the browser:
For more information about the porting process please check my website.
v1.0 - 21 Aug 2011
Initial port to Android
v1.1 23 - Aug 2011
Added command line options
Added listing of all local IPs (please check screenshot, it reports IPs and interfaces when starting up. Helps a lot to find out the WiFi IP, tun.ko is detected and works too)
Added Basic HTTP authentication for security
PS: if you have other rooted Android phones, I'm very interested in feedback if this works or not. I did not use anything specific to X10.