Thread: Apache on iPhone - How Cool!!
-
10-04-2007, 10:01 AM #21
Brilliant!
It worked!!
I was unaware of the local IP address, but that worked flawlessly!!
-
10-05-2007, 12:15 PM #22
Best use of apache is to run all those iphone webapps directly from the phone itself. Take a look, this is how it works!
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/Yl7JHp9WkDs"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Yl7JHp9WkDs" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
using lighttpd instead of apache, but you can do the same using apache-Shai Perednik
http://shaiperednik.com
-
10-06-2007, 10:52 AM #23
Yea that was next on my list.
But, dude, that video is like blurrrrrryyy city. I would like to have been able to see that the iPhone was in fact not downloading anything from the 'Net--like an airplane mode symbol. Actually it would be nice to be able to see anything.
Also, what did you install server-side to support all of these apps? And how/where did you grab all the server-side code?
BTW: I am not talking about launching URLs from the springboard. If that was the point of your vid then never mind.
--
Mike
-
10-06-2007, 12:10 PM #24
Indeed: how did you do that?
-
10-06-2007, 01:10 PM #25
sorry for the blurry video guys.
I'll redo it monday. For now heres the how to I quickly wrote up:
using lighttpd, Erika's OpenURL, and WinHtTrack I was able to get normal web widgets/apps to run native on the iphone. Using WinHtTrack download the entire site, put it in the sites folder after installing lighttpd, and use OpenURL to create the icon on the springboard!
more details and pictures to come-Shai Perednik
http://shaiperednik.com
-
10-09-2007, 08:36 PM #26
I used Manzana to access the index.html file and right-clicking only allows me to delete it. Renaming is grayed-out at won't allow it. How do I re-name it? (BTW, I'm excited to add the pdf files as ebooks. The Books.app application is great but only .txt and .html files )
-
10-10-2007, 01:06 PM #27
You really don't need index.html, it is just a crude generic home page supplied by Apache. You could just delete it, or even copy it to your desktop computer if you want to retrieve it later (simply reinstalling Apache will bring it back too).
Also, you can create folders under the .../Documents folder to organize files (e.g., OfficeDocs, PDFs, etc.)
--
Mike
-
10-10-2007, 03:43 PM #28
I mentioned it in another thread, but one thing I did once I installed lighttpd to read local pdfs was enable a stylesheet for the directory index. So this enables you to up the size of the filename etc, so that it looks more "iphone-like", and you don't immediately need to zoom in to be able to hit the links accurately. I'm sure there is something similar for Apache somewhere.
Edit: Here's a screenshot. I'm sure someone with better CSS skills could make it much nicer!
Last edited by cazlar; 10-10-2007 at 04:07 PM.
-
10-10-2007, 04:15 PM #29-Shai Perednik
http://shaiperednik.com
-
10-10-2007, 05:19 PM #30
See here: http://www.modmyi.com/forums/showpos...5&postcount=15 on how to enable directory listing in lighttpd. To enable the css, in the same config file add a line like
, then you can just make a css file with that name in your /Sites directory that lighttpd made. I used mobileTextEdit to edit both the config and css files on the phone, rather than switching files back and forth with ssh. If you want, I can post my current css later tonight.Code:dir-listing.external-css = "/iphonedirlist.css"
-
10-11-2007, 09:38 AM #31
please post your css file, I cant CSS to save my life ;(
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", )
Last edited by shaiss; 10-11-2007 at 09:48 AM.
-Shai Perednik
http://shaiperednik.com
-
10-11-2007, 09:49 AM #32
How to start and stop Apache?
I want the freedom to turn on and off my webserver.
In terminal I type apachectl -k stop and it says stop but then u open http://localhost or http://127.0.0.1 and its still running.
weird does anyone know?????
-
10-11-2007, 09:51 AM #33-Shai Perednik
http://shaiperednik.com
-
10-11-2007, 10:36 AM #34
Oops, just glancing at my conf file, it should read "enable", not "enabled". Sorry, I'll edit my earlier post, and also post my css when I get a chance today.
-
10-11-2007, 11:04 AM #35
would be nice if someone could make a css file or whatever so browsing the sites folder would feel like the iphone interface that the webapps use. that would be great!
-Shai Perednik
http://shaiperednik.com
-
10-11-2007, 12:42 PM #36
Here's my current one. As I said, I suck at CSS too, so I'm sure it can get a LOT better in the hands of a real designer
Code:a, a:active {text-decoration: none; color: blue;} a:visited {color: #48468F;} a:hover, a:focus {text-decoration: underline; color: red;} h2 {display:none;} table {margin-left: 10px;} th, td { font: 20pt Helvetica; text-align: left;} th { font-weight: bold; padding-right: 14px; padding-bottom: 3px;} td {padding-right: 10px; border-top: 1px solid #d9d9d9;} td.s, th.s {text-align: right;} div.list { font-size:36pt; background-color: white; } td.m { font-size:16pt;} td.t { font-size:20pt;} td.s { font-size:24pt;} td.n { font-size:40pt; padding-top:12px; padding-bottom:12px; } div.foot {dispay:none; font: 1pt monospace; color: #fff;}
-
10-11-2007, 01:02 PM #37
cool, works for me, but yeah, I'm sure someone could do better
-Shai Perednik
http://shaiperednik.com
-
10-11-2007, 02:14 PM #38
How does the apache server affect the batterylife?
When I unload -w or stop with UIctl, it still works in safari. and I still see it running with top in terminal.
-
10-12-2007, 04:52 PM #39
Excellent, everything working OK. I'd managed to arrange all my PDFs, Docs, local htmls.
CSS file definitely needs tuning.
-
11-17-2007, 06:05 AM #40
Q
I install apache and then open to safari and type in the web address where I get a message from apache saying software successfully installed.
I then use mobile finder to navigate to library but there is no WebServer folder and I can't find any file called index.html
Am i supposed to create the webserver and documents folders manually?
any help appreciated
and apache doesn't show up in my list of applications even though it says installed. I presume it is supposed to?Last edited by bobjames; 11-17-2007 at 06:05 AM. Reason: Automerged Doublepost



LinkBack URL
About LinkBacks
Reply With Quote


