Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: PDF storage and reader

  1. #21
    Quote Originally Posted by cazlar View Post
    Sorry about replying to myself, but if anyone is interested in this, to turn on directory listings you need to edit the lighttpd.conf file (in /usr/local/etc/ IIRC) to add
    Code:
    dir-listing.activate = "enabled"
    and also add
    Code:
    "mod_dirlisting"
    in the module listing alongside the "mod_cgi" (separate with a comma).

    Restart the phone (I guess you could just restart lighttpd if you wanted) and you can browse your pdfs :-)

    Edit: And you could probably style the directory listing via CSS (there's an option to enable this) to get something that looked very pretty on the iPhone. I'm crappy at CSS though.
    I tried this but it didnt work. I changed the file as stated above, put it back in the /usr/local/etc/ overrighting the original. I restart lighttpd go to 127.0.0.1 and get "server not found". when I restore the original lighttpd.conf file and restart lighttpd it works fine but no directory browsing obviously.

    Heres my lighttpd.conf, any help is appriciated
    Code:
    server.document-root = "/private/var/root/Sites/"
    # server.port = 80 # Default
    #server.bind = "127.0.0.1" # Default: All
    server.modules = ( "mod_cgi", "mod_dirlisting" )
    server.tag = "iPhone lighttpd"
    
    #server.pid-file            = "/var/run/lighttpd.pid"
    
    accesslog.filename = "/var/log/lighttpd/access.log"
    server.errorlog = "/var/log/lighttpd/error.log"
    dir-listing.activate = "enabled"
    
    index-file.names = ( "index.php", "index.py", "index.pl", "index.cgi", "index.html", "default.html" )
    url.access-deny = ( "~", ".inc" )
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi", ".py" )
    
    cgi.assign = ( ".pl"  => "/usr/bin/perl", ".py" => "/usr/bin/python", ".rb" => "/usr/local/bin/ruby", ".cgi" => "", ".sh" => "" )
    
    mimetype.assign             = (
    	".pdf"          =>      "application/pdf",
    	".sig"          =>      "application/pgp-signature",
    	".spl"          =>      "application/futuresplash",
    	".class"        =>      "application/octet-stream",
    	".ps"           =>      "application/postscript",
    	".torrent"      =>      "application/x-bittorrent",
    	".dvi"          =>      "application/x-dvi",
    	".gz"           =>      "application/x-gzip",
    	".pac"          =>      "application/x-ns-proxy-autoconfig",
    	".swf"          =>      "application/x-shockwave-flash",
    	".tar.gz"       =>      "application/x-tgz",
    	".tgz"          =>      "application/x-tgz",
    	".tar"          =>      "application/x-tar",
    	".zip"          =>      "application/zip",
    	".mp3"          =>      "audio/mpeg",
    	".m3u"          =>      "audio/x-mpegurl",
    	".wma"          =>      "audio/x-ms-wma",
    	".wax"          =>      "audio/x-ms-wax",
    	".ogg"          =>      "application/ogg",
    	".wav"          =>      "audio/x-wav",
    	".gif"          =>      "image/gif",
    	".jpg"          =>      "image/jpeg",
    	".jpeg"         =>      "image/jpeg",
    	".png"          =>      "image/png",
    	".xbm"          =>      "image/x-xbitmap",
    	".xpm"          =>      "image/x-xpixmap",
    	".xwd"          =>      "image/x-xwindowdump",
    	".css"          =>      "text/css",
    	".html"         =>      "text/html",
    	".htm"          =>      "text/html",
    	".js"           =>      "text/javascript",
    	".asc"          =>      "text/plain",
    	".c"            =>      "text/plain",
    	".cpp"          =>      "text/plain",
    	".log"          =>      "text/plain",
    	".conf"         =>      "text/plain",
    	".text"         =>      "text/plain",
    	".txt"          =>      "text/plain",
    	".dtd"          =>      "text/xml",
    	".xml"          =>      "text/xml",
    	".mpeg"         =>      "video/mpeg",
    	".mpg"          =>      "video/mpeg",
    	".mov"          =>      "video/quicktime",
    	".qt"           =>      "video/quicktime",
    	".avi"          =>      "video/x-msvideo",
    	".asf"          =>      "video/x-ms-asf",
    	".asx"          =>      "video/x-ms-asf",
    	".wmv"          =>      "video/x-ms-wmv",
    	".bz2"          =>      "application/x-bzip",
    	".tbz"          =>      "application/x-bzip-compressed-tar",
    	".tar.bz2"      =>      "application/x-bzip-compressed-tar",
    	# default mime type
    	""              =>      "application/octet-stream",
    )

  2. #22
    I had the same problem and now it's how I make file list show.
    Rename index.html to something like indexOrg.html, which is located under ~/Sites. Now it should be able to show a correct listing under 127.0.0.1/.

    Hope this helps.
    Last edited by rickatsd; 2007-10-15 at 10:54 AM. Reason: Automerged Doublepost

  3. #23
    well i have a question as well... i i sent a pdf file as an attachment to my phone i can only look at it if the phone is connected to a wifi network. is there a way to look at the files even if i'm not connected to the internet?

  4. #24
    Livin the iPhone Life Eurisko's Avatar
    Join Date
    Aug 2007
    Location
    Toronto, Canada
    Posts
    3,307
    Thanks
    12
    Thanked 562 Times in 483 Posts

    Quote Originally Posted by soenke79 View Post
    well i have a question as well... i i sent a pdf file as an attachment to my phone i can only look at it if the phone is connected to a wifi network. is there a way to look at the files even if i'm not connected to the internet?
    Install Apache so you can use your iPhone as a webserver. You can then view your PDF documents locally. There are some existing threads on how to do this.

  5. #25
    use ibrickr or a SSH/FTP client (cyberduck) to transfer the pdf files over to any folder you want, and use PDF Viewer (in installer.app) to view them.

  6. #26
    well thanks. i installed ibrickr. works ok. but for some reason i can not access some folders on my iphone. and if i create a folder through ibrickr it doesn't appear on my phone. what to do? well, can't find the media folder on ibrickr as well... thanks for your help

  7. #27
    Soenke79, try accessing with WinSCP.

    I've opened a new thread with all modifications in one place.

    PDF/CHM/DOC/XLS/photo viewer - all-in-one Safari/Lighttpd based (complete instruct.)

    Resulting look...


Page 2 of 2 FirstFirst 12
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •