webOS Nation Forums >  Homebrew >  WebOS Internals > Lighty Web Server - lighttpd on your Pre
Lighty Web Server - lighttpd on your Pre

  Reply
 
LinkBack Thread Tools Display Modes
Old 12/19/2009, 08:34 AM   #1 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default Lighty Web Server - lighttpd on your Pre

The Optware section in Preware now has a web server available for installation on your Pre:



By default, you get access (over wifi by default - Pixi users see post#4 for assistance) to the directory listing of your USB /media/internal partition: (Note that for security reasons, the package has now been changed to only show the /media/internal/www directory. You can edit the configuration file to change this back to /media/internal.)



If you drop an index.html file, some javascript, and some images into /media/internal, you can serve the preware.org web site from your Pre:(This has now been changed to /media/internal/www.)



Don't have a desktop handy to browse the site you just created on your Pre? Use the built-in browser:



Documentation for Lighty is at http://www.lighttpd.net, and the configuration file is in /opt/etc/lighttpd/lighttpd.conf

-- Rod
Attached Images
File Type: png Lighty.png (45.6 KB, 1146 views) Email Attachment
File Type: png Lighty-Web.png (35.4 KB, 1142 views) Email Attachment
File Type: png Lighty-List.png (75.2 KB, 1156 views) Email Attachment
File Type: png Lighty-Site.png (183.4 KB, 1170 views) Email Attachment
File Type: png Lighty-browser-site.png (47.0 KB, 1063 views) Email Attachment
File Type: png Lighty-browser-localhost.png (120.8 KB, 1081 views) Email Attachment
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals

Last edited by rwhitby; 02/09/2010 at 03:29 PM.
rwhitby is offline   Reply With Quote
Thanked by mhous33, mk3, rb_pre, ZR1
Old 12/19/2009, 09:49 AM   #2 (permalink)
Moderator
 
jbg7474's Avatar
 
Join Date: Jan 2009
Location: SW Ohio
Posts: 3,858
Likes Received: 92
Thanks: 1,019
Thanked 1,061 Times in 715 Posts
Default

I don't know if I really want to do this or not, but the fact that it CAN be done is totally, unequivocally, frickin' awesome!!!
__________________
Palm III-->Handspring Visor-->Sony Clie PEG-NR70-->no PDA -->Palm Treo 755p-->Palm Pre-->HP Veer
jbg7474 is offline   Reply With Quote
Old 12/19/2009, 01:19 PM   #3 (permalink)
Member
 
SirWill's Avatar
 
Join Date: Jun 2009
Location: Everett, WA
Posts: 441
Likes Received: 0
Thanks: 63
Thanked 48 Times in 41 Posts
Default

Oh come on, I want to serve my web page over EVDO too.
__________________
-----------------
Palm III, Palm IIIc, TT, T3, T5, TX, Pre from Day 1.
SirWill is offline   Reply With Quote
Old 12/19/2009, 03:28 PM   #4 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by SirWill View Post
Oh come on, I want to serve my web page over EVDO too.
Edit /etc/event.d/mobi.optware.lighttpd

(That's for Pixi users too)

-- Rod
rwhitby is offline   Reply With Quote
Thanked By: mk3
Old 12/19/2009, 04:38 PM   #5 (permalink)
mk3
Member
 
mk3's Avatar
 
Join Date: Apr 2009
Location: GMT -8
Posts: 575
Likes Received: 1
Thanks: 333
Thanked 55 Times in 44 Posts
Default

forgive this question, but how do you edit that file type?
mk3 is offline   Reply With Quote
Old 12/19/2009, 04:54 PM   #6 (permalink)
Member
 
TIWizard's Avatar
 
Join Date: Jun 2009
Location: USA
Posts: 745
Likes Received: 0
Thanks: 81
Thanked 218 Times in 75 Posts
Default

Quote:
Originally Posted by mk3 View Post
forgive this question, but how do you edit that file type?
It should just be a text file. Vi or similar will be fine
__________________
Sprint Palm Pre - WebOS 2.1 > Sprint HTC Arrive
TIWizard is offline   Reply With Quote
Thanked By: mk3
Old 12/19/2009, 04:54 PM   #7 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by mk3 View Post
forgive this question, but how do you edit that file type?
Basic Linux Use - WebOS Internals

See http://forums.precentral.net/palm-pr...-transfer.html for how to transfer files on or off, or just use vi or Nano on the Pre.

I personally use Emacs and tramp to edit files on the Pre over wifi ... (using OpenSSH SFTP Server from the same Optware section in Preware).

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals

Last edited by rwhitby; 12/19/2009 at 05:03 PM.
rwhitby is offline   Reply With Quote
Thanked By: mk3
Old 12/20/2009, 09:45 AM   #8 (permalink)
Member
 
Join Date: Jul 2009
Location: Ireland
Posts: 255
Likes Received: 0
Thanks: 33
Thanked 17 Times in 14 Posts
Default

I set this up from Preware and I can the list of files when I use localhost from my pre but on my Pc when I put http://192.168.1.4/ into my browser it wont connect.

Am I missing something?

Gx
Griffinx is offline   Reply With Quote
Old 12/20/2009, 04:43 PM   #9 (permalink)
Homebrew Developer
 
milominderbinder's Avatar
 
Join Date: Mar 2005
Location: ↑ iPhone Black Launcher Theme
Posts: 4,593
Likes Received: 117
Thanks: 2,535
Thanked 3,156 Times in 908 Posts
Default

Rod or anyone,

I am lost. Can you walk us through the steps to set this up?

I have read all of the links and installed everything I can think of...

- Craig
__________________
- Milo
Getting StartedRingtonesVideos/MoviesPatches/ThemesMusic Player(Remix)
Battery LifeBackup/SyncingGreat Signal-AiraveiPhone ThemeForum Guidelines

Last edited by milominderbinder; 12/20/2009 at 05:29 PM.
milominderbinder is offline   Reply With Quote
Old 12/20/2009, 04:49 PM   #10 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by milominderbinder View Post
Rod,

I am lost. Can you walk us through the steps to set this up?

I have read all of the links and installed everything I can think of...

- Craig
1) Install Preware

2) Install Lighty Web Server in the Optware section of Preware

3) Access BlackBerry Forums at CrackBerry.com on the Pre

4) Access http://ip-address-of-wifi-connected-pre/ (I really hope I don't get questions from people who actually type in the 'ip-address-of-wifi-connected-pre' string instead of understanding what is meant there)

Any more detail than that will need to be provided by the others who have already done this.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is offline   Reply With Quote
Old 12/20/2009, 06:12 PM   #11 (permalink)
Homebrew Developer
 
milominderbinder's Avatar
 
Join Date: Mar 2005
Location: ↑ iPhone Black Launcher Theme
Posts: 4,593
Likes Received: 117
Thanks: 2,535
Thanked 3,156 Times in 908 Posts
Default

Rod, I have done exactly the following:

1) Install Preware

2) Install Lighty Web Server in the Optware section of Preware

3) Open the Browser App on the Pre and type
Code:
http://localhost/
I get this error message:
Code:
Unable to Load Page
http://localhost/
Error loading page. [111]
I have installed:
Lighty Web Installer
OpenSSH
OpenSSH SFTP Service
OpenSSL

- Craig
__________________
- Milo
Getting StartedRingtonesVideos/MoviesPatches/ThemesMusic Player(Remix)
Battery LifeBackup/SyncingGreat Signal-AiraveiPhone ThemeForum Guidelines
milominderbinder is offline   Reply With Quote
Old 12/20/2009, 08:09 PM   #12 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by milominderbinder View Post
Rod, I have done exactly the following:

1) Install Preware

2) Install Lighty Web Server in the Optware section of Preware

3) Open the Browser App on the Pre and type
Code:
http://localhost/
I get this error message:
Code:
Unable to Load Page
http://localhost/
Error loading page. [111]
I have installed:
Lighty Web Installer
OpenSSH
OpenSSH SFTP Service
OpenSSL

- Craig
No idea. Has anyone else got it to work ? I know a couple of people in the IRC channel have ...

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is offline   Reply With Quote
Old 12/21/2009, 09:01 AM   #13 (permalink)
Homebrew Developer
 
milominderbinder's Avatar
 
Join Date: Mar 2005
Location: ↑ iPhone Black Launcher Theme
Posts: 4,593
Likes Received: 117
Thanks: 2,535
Thanked 3,156 Times in 908 Posts
Default

If anyone can make this work, would you please post the instructions?

- Craig
__________________
- Milo
Getting StartedRingtonesVideos/MoviesPatches/ThemesMusic Player(Remix)
Battery LifeBackup/SyncingGreat Signal-AiraveiPhone ThemeForum Guidelines
milominderbinder is offline   Reply With Quote
Thanked By: DigitalNight
Old 12/21/2009, 09:15 PM   #14 (permalink)
Member
 
Join Date: Aug 2009
Posts: 187
Likes Received: 3
Thanks: 28
Thanked 6 Times in 6 Posts
Default

I got it to work for me without any problem. I have an index.html file in my media partition and if I type in BlackBerry Forums at CrackBerry.com it goes to that page without any problem. Have you reset luna manager after installation?
primetime34 is offline   Reply With Quote
Old 01/14/2010, 04:22 AM   #15 (permalink)
Member
 
Join Date: Oct 2009
Location: Germany
Posts: 61
Likes Received: 1
Thanks: 62
Thanked 1 Time in 1 Post
Default

Where can i start/stop the lighttpd service? In /etc/init.d/ is no lighttpd And in /opt/etc/init.d is nothing, too :/

And how can i display CPU load on the Webserver for my Palm Pre?

Thanks.
rondera is offline   Reply With Quote
Old 01/14/2010, 05:47 AM   #16 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by rondera View Post
Where can i start/stop the lighttpd service? In /etc/init.d/ is no lighttpd And in /opt/etc/init.d is nothing, too :/

And how can i display CPU load on the Webserver for my Palm Pre?

Thanks.
stop mobi.optware.lighttpd

start mobi.optware.lighttpd

Upstart files are in /etc/event.d

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is offline   Reply With Quote
Thanked by palmdoc2005, rondera
Old 01/22/2010, 01:37 AM   #17 (permalink)
Member
 
SiLlY's Avatar
 
Join Date: Aug 2009
Posts: 273
Likes Received: 0
Thanks: 45
Thanked 26 Times in 20 Posts
Default

You know what would make this even better?? A patch that adds a switch/toggle anywhere in the gui to restart, shutdown and stop the server.

Thanks rwhitby! You guys never cease to amaze..
SiLlY is offline   Reply With Quote
Old 01/22/2010, 02:55 AM   #18 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by SiLlY View Post
You know what would make this even better?? A patch that adds a switch/toggle anywhere in the gui to restart, shutdown and stop the server.

Thanks rwhitby! You guys never cease to amaze..
I'm hoping that someone will write a webOS front-end to the upstart manager service, which could then control this and many other upstart scripts from one front-end application.

-- Rod
rwhitby is offline   Reply With Quote
Old 01/22/2010, 11:19 AM   #19 (permalink)
Member
 
Join Date: Jan 2010
Location: Lakeland, FL
Posts: 15
Likes Received: 0
Thanks: 1
Thanked 1 Time in 1 Post
Default

I just found this app, and it looks pretty interesting. I didn't see anything that specifically said this, so I just want to ask. Can this web browser work only over Wifi? Or is it accessable over EVDO
JoeD1346 is offline   Reply With Quote
Old 01/22/2010, 11:39 AM   #20 (permalink)
Member
 
Hz-R's Avatar
 
Join Date: Oct 2009
Location: Hampshire, UK
Posts: 245
Likes Received: 0
Thanks: 38
Thanked 21 Times in 16 Posts
Default

After you installed it, just type "localhost" in the browser and you see the whole file structure on your Pré. Worked straight out of the box for me.
I can now open a TiddlyWiki locally on my Pré, cool. Just have to work on the CSS a bit I guess.

To access your Pré from another PC, I found it easiest to log into my router and check there which IP addresses were used. Mine is on: http://192.168.178.36/
__________________
< M105 - M130 - M515 - T|T3 - Clié UX50 - T|x - Pré - Pré 2 - TouchPad 16GB>
[url]

Last edited by Hz-R; 01/22/2010 at 12:38 PM.
Hz-R is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0