please post your css file, I cant CSS to save my life ;(
Quote:
Originally Posted by cazlar
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 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",
)