webOS Nation Forums > Homebrew > WebOS Internals > Lighty Web Server - lighttpd on your Pre
1 2 3 4 5 6 
Developer: rwhitby
at: 09:34 AM 12/19/2009
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: Lighty.png (45.6 KB) Lighty-Web.png (35.4 KB) Lighty-List.png (75.2 KB) Lighty-Site.png (183.4 KB) Lighty-browser-site.png (47.0 KB) Lighty-browser-localhost.png (120.8 KB) 
Reply
Moderator: jbg7474
at: 10:49 AM 12/19/2009
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!!!
Reply
Member: SirWill
at: 02:19 PM 12/19/2009
Oh come on, I want to serve my web page over EVDO too.
Reply
Developer: rwhitby
at: 04:28 PM 12/19/2009
Originally Posted by SirWill:
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
Reply
Member: mk3
at: 05:38 PM 12/19/2009
forgive this question, but how do you edit that file type?
Reply
Member: TIWizard
at: 05:54 PM 12/19/2009
Originally Posted by mk3:
forgive this question, but how do you edit that file type?
It should just be a text file. Vi or similar will be fine
Reply
Developer: rwhitby
at: 05:54 PM 12/19/2009
Originally Posted by mk3:
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
Reply
Member: Griffinx
at: 10:45 AM 12/20/2009
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
Reply
Homebrew Developer: milominderbinder
at: 05:43 PM 12/20/2009
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
Reply
Developer: rwhitby
at: 05:49 PM 12/20/2009
Originally Posted by milominderbinder:
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
Reply
Homebrew Developer: milominderbinder
at: 07:12 PM 12/20/2009
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/[/CODE]

I get this error message:
[CODE]Unable to Load Page
http://localhost/
Error loading page. [111][/CODE]

I have installed:
Lighty Web Installer
OpenSSH
OpenSSH SFTP Service
OpenSSL

- Craig
Reply
Developer: rwhitby
at: 09:09 PM 12/20/2009
Originally Posted by milominderbinder:
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/[/CODE]

I get this error message:
[CODE]Unable to Load Page
http://localhost/
Error loading page. [111][/CODE]

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
Reply
Homebrew Developer: milominderbinder
at: 10:01 AM 12/21/2009
If anyone can make this work, would you please post the instructions?

- Craig
Reply
Member: primetime34
at: 10:15 PM 12/21/2009
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?
Reply
Member: rondera
at: 05:22 AM 01/14/2010
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.
Reply
Developer: rwhitby
at: 06:47 AM 01/14/2010
Originally Posted by rondera:
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
Reply
Member: SiLlY
at: 02:37 AM 01/22/2010
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..
Reply
Developer: rwhitby
at: 03:55 AM 01/22/2010
Originally Posted by SiLlY:
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
Reply
Member: JoeD1346
at: 12:19 PM 01/22/2010
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
Reply
Member: Hz-R
at: 12:39 PM 01/22/2010
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/
Reply
1 2 3 4 5 6 
webOS Nation Forums > Homebrew > WebOS Internals > Lighty Web Server - lighttpd on your Pre