While no one comes up with a nice little program able to open documents on the iPhone, there’s a quick hack you can do in order to open your documents and read them on the go.
In case you didn’t notice (I just noticed that yesterday, when clicking a PDF link by accident), SafariMobile (the one that comes with the iPhone) is able to handle PDF, DOC, TXT - and even XLS files - quite well. And since Safari does the screen rotation thing, it’s an even better tool for reading eBooks and long documents. So here’s the quick recipe on how to do this trick:
- First of all, you have to have your iPhone unlocked. We’re not getting into this here, since there’s a bunch of already well documented procedures out there.
- Once your iPhone is “jailbroke”, get installer.app on it (using iBrickr in Windows or iFuntastic on the Mac). Installer.app is a neat little tool that finds and installs third-party apps (Ubuntu users will find it similar to the Synaptics download manager).
- Now that you have installer.app running, click the “Installer” icon and look for lighttpd (under the “Network” tab). Click it, then “Install”.
After this is done, open Safari and type in “http://localhost” on the address bar.
Neat, uh?
- And now, the final touch. Using iBrickr (or whatever iPhone file manager you use), look for the /var/root/Sites/ folder and delete the index.html file. That’s the little page that is shown when you browse to http://localhost. Now, in order to list the content of the folder, navigate to /usr/local/etc/lighttpd.conf and download the file to your machine. Then edit it and add this line to the beginning (or end) of the file:
dir-listing.activate = "enable"
Save the file and upload it back again, overriding the original one. Now restart your phone, so that lighttpd reloads, and navigate again with Safari to “http://localhost”. You’ll be able to see the listing of the /var/root/Media/Sites directory.
You can probably guess the last part: open iBrickr, locate the PDFs and Word Documents you want to read and copy them to this folder. Next time you reload the page, the files will show up. Just click it to read.
Now if you excuse me, I have a brand new eBook to read on my little screen.
























thunderbane on November 7th, 2007 at 6:17 am says:
I installed lighttpd. I can’t get in on http://localhost on safari. It says that the page can’t find the server
thunderbane on November 7th, 2007 at 6:24 am says:
what other apps should I make sure that I have installed before using lighttpd?
herval on November 7th, 2007 at 6:24 am says:
try http://127.0.0.1 instead!
thunderbane on November 7th, 2007 at 6:34 am says:
tnx man. got it.
Nebras Alattar on November 17th, 2007 at 2:05 am says:
I have already followed the steps above, but always when i use Safari i get this message “Safari can’t open the page because it couldn’t connect to the server”. FYI i used http://localhost and http://1270.0.1 but also i get the same error message. Please kindly can you tell me how can i solve this error.
Thank you so much
Kæsp on November 22nd, 2007 at 10:16 am says:
great guide, thanks (:
marc on December 30th, 2007 at 3:54 pm says:
Thank you. Excellent
Andrej from Slovenia-EU on January 12th, 2008 at 12:50 pm says:
i followed the instructions and the procedure went well and this is what i found out:
first if you have iSpit installed this will not work properly
i’m using the 1.1.2 version phone bought on at start of december 2007 i think it was production week 47 or smth like that…..jailbroken downgraded to 1.1.1. and then ibricked and then again upgraded to 1.1.2 so everything’s working except for the phone function(i’m the process of getting the thingy from Bladoxx the AnySim thing or smth like that)…..
first the localhost adress doesn’t work, only 127.0.0.1 thing…..which is not good because you can’t access your phone via safari when no WiFi is in the area….
the second thing i find the most disturbing is, that by typing http://127.0.0.1 i get into the http://127.0.0.1/images/ directory…..so any suggestion what i should do?
you can contact me either per my myspace.com/cricek webside or per my email ambasador@amis.net
thank you in advance
Irvan Ferdiansyah on January 25th, 2008 at 3:11 am says:
mine says the same thing to, i can’t go into localhost, nom i’m running 1.1.2
the srange thing is that, when i was still at 1.0.2, it worked fine for me.
or maybe it’s because of the lighttpd, seeing thats it now been updated to 1.4 17-2
Dima on January 31st, 2008 at 7:56 am says:
Thank you! All is worked on 1.1.2 firmware
ben on March 4th, 2008 at 10:10 am says:
Thx!
I did as you described. But. First of all, i havent any “media” subfolder, and i can’t create for my own. I dont know why…
Btw almost everything is working fine, expect. I funtastic can’t copy any *.doc or *.xls files from my HD to Iphone. (it’s working fine with *.jpg or *.pdf)
Reading doc files is so important for me. So please any suggesison will help.
thx again.
ben on March 4th, 2008 at 10:12 am says:
Sorry i forgot.
Iphone 1.1.3
Ifuntastic 5.0.0
Leopard 10.5.2
clonick on March 10th, 2008 at 8:55 pm says:
i’m using firmware 1.1.2 and i was installed lighttpd… it work if i write all the path: http://127.0.0.1/example.pdf but, not work the listing function.
i was edited the lighttpd.conf file and add this firs line only and again i was try with the 2 lines:
dir-listing.activate = “enable”
dir-listing.activate = “mod_dirlisting”
and at begging, in middle and at the end, and it not work. =(
please help !!
NOTE: other thing than i wish to know is: how to start the lighttpd when u totally power of the iphone and then, power on -the lighttp app not start with the iphone, how i can start the app ?
thanks a lot!
Pauline Rusinich on March 28th, 2008 at 9:52 pm says:
I’ve had my iphone 3 hrs. The worst thing I ever bought. The blue tooth does not work with this phone. I can’t make call from the earbud, three way or answer calls? Ikes. This is a night mare. I was told the I phone is a PDA. My old PDA were much better also.. No room to store. I wish I saw this blog when I was researching.
SomeBody on May 7th, 2008 at 5:52 am says:
works like a charm
btw, its var/root/sites NOT var/root/media/sites
also the 127.0.0.1 works but the localhost doesnt
not that it matters a lot
thank you
MindsCave on May 9th, 2008 at 9:44 am says:
Thanks for the help - worked flawlessly.