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 01/25/2010, 02:47 AM   #21 (permalink)
Member
 
rlanza1054's Avatar
 
Join Date: Jan 2005
Location: Astoria Queens, NYC
Posts: 1,823
Likes Received: 1
Thanks: 201
Thanked 154 Times in 118 Posts
Default

I just tried this for the fun of it and it works as advertised.

You just install LIGHTLY Web Server from Preware.

It install the prerequisites: Optware Bootstrap and pcre before installing Lightly.

After the installation, reboot your Pre.

Then as some of the others have said, just type in your Pre browser 'localhost' and you should see a directory of the stuff on your USB partition.

I then used an app: 'What is my Ip' and got my IP address (internal ... intranet address) usually looks like: 192.168.1.15 or something similar.

Got that address and used my home computer which is also attached to my home network or intranet, and typed in my browser the address provided to me by 'what is my ip' (example: 192.168.1.15) and displayed on the browser page was directory of what I had stored on my USB partition.

I was able to switch to different folders I had on the USB partition and I even download a text file that I had store in it.

Just as a note, I did not have OpenSHH SFTP Server install like someone in an message in this thread listed as having install... That was way too much stuff.

Keep it simple and follow the instructions to the letter and it works just fine.

Also, just read on WebOS Internals, that Sprint blocked the processing of access to port 80 on it's network. So that means you can only use this particular Web Server from the WiFi connection, not the EDVO connection.

Other products might do that, but be careful, and make sure you are locked down in some way. Have a password at least!

Rob
__________________
Robert L
Astoria Queens, N.Y.C
- Palm Pre (Sprint) - formally Palm Treo 650
Version 1.4.1.1
Sprint Configuration 2.3
Model: P100EWW
Hardware Version: A
Firmware: CC1.4(510)

rlanza1054 is offline   Reply With Quote
Old 01/26/2010, 03:48 AM   #22 (permalink)
R_E
Member
 
Join Date: Jul 2009
Posts: 329
Likes Received: 5
Thanks: 29
Thanked 49 Times in 34 Posts
Default

it has been expressed that it is possible to make this work over EVDO. There are some suggestions in this thread and i tried them, but frankly, I don't really have enough expertise to be messing with this stuff. The mobi.optware.lighttpd file shows this

Code:
description "Lighttpd Web Server"
start on stopped finish
stop on runlevel [!2]
console none
# Make sure web sessions don't slow down GUI use
nice 5
# Restart the web server if it exits/dies
respawn
exec /opt/sbin/lighttpd -D -f /opt/etc/lighttpd/lighttpd.conf
pre-start script
# Remove the "-i eth0" on the following lines to enable access
# over the cellular data network (EVDO, etc).
# Add firewall rule to allow HTTP access over WiFi on port 80
/usr/sbin/iptables -D INPUT -i eth0  -p tcp --dport  80 -j ACCEPT || /bin/true
/usr/sbin/iptables -D INPUT -i eth0  -p tcp --dport 443 -j ACCEPT || /bin/true
# Add firewall rule to allow HTTPS access over WiFi on port 443
/usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport  80 -j ACCEPT
/usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 443 -j ACCEPT
end script
# end of file
But i'm really weary of messing with my iptables. Also, i'm not sure when this file is run, so editing it may never actually do anything.

In the lighttpd.conf file, i see the option to change ports, and it has been discussed that 80 is not good, but changing it doesn't help. I'm not sure if it is blocked by a rule in iptables or what.

So my request is, can anyone tell me how to enable lighttpd over EVDO with read-only access and also how to implement a password? Any help would be greatly appreciated.

P.S. Does anyone know if this program consumes battery in any substantial way?
R_E is offline   Reply With Quote
Old 01/31/2010, 08:12 PM   #23 (permalink)
Member
 
Join Date: Aug 2009
Posts: 2
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by rwhitby View Post
stop mobi.optware.lighttpd

start mobi.optware.lighttpd

Upstart files are in /etc/event.d

-- Rod
I get:

palm-webos-device:~$ stop mobi.optware.lighttpd
-sh: stop: not found

Do I need another package to get the "start / stop" commands?
jasondet is offline   Reply With Quote
Old 01/31/2010, 08:51 PM   #24 (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 jasondet View Post
I get:

palm-webos-device:~$ stop mobi.optware.lighttpd
-sh: stop: not found

Do I need another package to get the "start / stop" commands?
You need to be properly logged in as root, with root's path correctly set up.

-- Rod
rwhitby is offline   Reply With Quote
Old 01/31/2010, 09:37 PM   #25 (permalink)
Member
 
rlanza1054's Avatar
 
Join Date: Jan 2005
Location: Astoria Queens, NYC
Posts: 1,823
Likes Received: 1
Thanks: 201
Thanked 154 Times in 118 Posts
Default

Quote:
Originally Posted by R_E View Post
it has been expressed that it is possible to make this work over EVDO. There are some suggestions in this thread and i tried them, but frankly, I don't really have enough expertise to be messing with this stuff.
As I wrote in a previous message:

Also, just read on WebOS Internals, that Sprint blocked the processing of access to port 80 on it's network. So that means you can only use this particular Web Server from the WiFi connection, not the EDVO connection.

I don't think it's possible unless you go thru a different port, since Sprint is probably blocking it.

Rob
__________________
Robert L
Astoria Queens, N.Y.C
- Palm Pre (Sprint) - formally Palm Treo 650
Version 1.4.1.1
Sprint Configuration 2.3
Model: P100EWW
Hardware Version: A
Firmware: CC1.4(510)

rlanza1054 is offline   Reply With Quote
Old 01/31/2010, 11:02 PM   #26 (permalink)
R_E
Member
 
Join Date: Jul 2009
Posts: 329
Likes Received: 5
Thanks: 29
Thanked 49 Times in 34 Posts
Default

Quote:
Originally Posted by rlanza1054 View Post
As I wrote in a previous message:

Also, just read on WebOS Internals, that Sprint blocked the processing of access to port 80 on it's network. So that means you can only use this particular Web Server from the WiFi connection, not the EDVO connection.

I don't think it's possible unless you go thru a different port, since Sprint is probably blocking it.

Rob
is there a way to configure it on some other port?
R_E is offline   Reply With Quote
Old 02/08/2010, 10:25 PM   #27 (permalink)
Member
 
Join Date: Sep 2009
Posts: 141
Likes Received: 0
Thanks: 30
Thanked 41 Times in 22 Posts
Default

Quote:
Originally Posted by R_E View Post
is there a way to configure it on some other port?
You can change the port in the lightthd.conf file.

But is it even working now days? The /etc/mobi.optware.lighttpd file is pointing to:

Quote:
exec /opt/sbin/lighttpd -D -f /opt/etc/lighttpd/lighttpd.conf
Which doesn't even exist anymore at that location. I tried using this:

Quote:
exec /media/cryptofs/apps/opt/sbin/lighttpd -D -f /media/cryptofs/apps/opt/etc/lighttpd/lighttpd.conf
With no results either. I had gotten the old manual version working fine, just thought i'd try the new shiny version
daventx is offline   Reply With Quote
Old 02/08/2010, 10:31 PM   #28 (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

/opt is definitely where the files should be. The mobi.optware.lighttpd post-install script should put them there.

But, we have been modifying the way that optware apps are installed, so this one may well have a bug at the moment.

I'll take a look at it.

-- 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 02/08/2010, 10:41 PM   #29 (permalink)
Member
 
Join Date: Sep 2009
Posts: 141
Likes Received: 0
Thanks: 30
Thanked 41 Times in 22 Posts
Default

Looking at the /opt/ again, i see a buncha links.. (i think they're called that, the "ln" thing in linux)

So it seems that the new install forgets to make the folders and links for lighttpd...

And just a thought, i think it'd be better to create a /media/internal/httpd and that be the root folder by default.. i'd hate thinking about people installing this and not removing it with shared files on wifi. Ya know?
daventx is offline   Reply With Quote
Old 02/08/2010, 10:52 PM   #30 (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 daventx View Post
Looking at the /opt/ again, i see a buncha links.. (i think they're called that, the "ln" thing in linux)

So it seems that the new install forgets to make the folders and links for lighttpd...

And just a thought, i think it'd be better to create a /media/internal/httpd and that be the root folder by default.. i'd hate thinking about people installing this and not removing it with shared files on wifi. Ya know?
Yeah, the lighttpd package is definitely broken - I'll fix it tonight.

And I'll move the server root to /media/internal/www

-- 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 02/08/2010, 11:45 PM   #31 (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

Version 1.4.25-5 released.

Make sure you install with Preware, so that the pcre package is also updated.

-- 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: daventx
Old 02/09/2010, 02:48 PM   #32 (permalink)
Member
 
Join Date: Dec 2009
Posts: 9
Likes Received: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi!
A little help here.

When i type localhost in the browser, the page only display the "parent directory" line. I canīt see my usb files or other directories. I tap on it but nothing happens. The same when i accces form my PC.

Am I missing anything? Itīs a Spanish (Movistar) Pre, by te way...

Thanks!!

Last edited by Tonino ZGZ; 02/09/2010 at 03:00 PM.
Tonino ZGZ is offline   Reply With Quote
Old 02/09/2010, 03:26 PM   #33 (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 Tonino ZGZ View Post
Hi!
A little help here.

When i type localhost in the browser, the page only display the "parent directory" line. I canīt see my usb files or other directories. I tap on it but nothing happens. The same when i accces form my PC.

Am I missing anything? Itīs a Spanish (Movistar) Pre, by te way...

Thanks!!
For security reasons (see a couple of posts above), the package was changed to only show the /media/internal/www directory.

You can edit /opt/etc/lighttpd/lighttpd.conf to change it back to /media/internal/ to show all your USB files.

This was also noted in the ChangeLog in the description of the package - did you read that before installing?

-- 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: Tonino ZGZ
Old 02/10/2010, 02:27 AM   #34 (permalink)
Member
 
Join Date: Feb 2010
Posts: 4
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Default

hi to all,

i have the lighttpd system up and running with webdav, just one last thing for me: it's still only read-only when i access the directories within the windows explorer (SP3) - also tried with cuteFTP/https, also read-only.
anyone any idea? already checked a couple of things (windows certificates, etc.) but with no effect...

thanks, great site by the way
miketou is offline   Reply With Quote
Old 02/10/2010, 04:44 AM   #35 (permalink)
Member
 
debilater's Avatar
 
Join Date: Nov 2009
Location: Germany
Posts: 145
Likes Received: 0
Thanks: 9
Thanked 59 Times in 23 Posts
Default

Here is a working WebDAV config for palm pre. Take a look. It works incl. write-support on windows (tested on Vista only)
debilater is offline   Reply With Quote
Old 02/10/2010, 12:21 PM   #36 (permalink)
Member
 
Join Date: Feb 2010
Posts: 4
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Default

okay, thanks. i crosschecked that...
but i guess it has something to do with authentication methods...
vista seems to handle digest, whereas XP doesn't.

how would i rewrite the code to change it to basic authentication?
miketou is offline   Reply With Quote
Old 02/16/2010, 09:03 PM   #37 (permalink)
Member
 
Join Date: Sep 2009
Posts: 104
Likes Received: 0
Thanks: 17
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by debilater View Post
Here is a working WebDAV config for palm pre. Take a look. It works incl. write-support on windows (tested on Vista only)
@the maker: I want in on this, just giving a shout-out how cool this ditty is...
the idea that I can browse my phone while its charging, safe at home on my LAN is novel... but I will want in on moving content to and from.

I promise I will learn to use this better, in your honor...

You must know, it works perfectly and I took note how to start and stop it.
Now to findout what the VI is and how to change your code with it some, and carefully so as not to break it.

@those who tried, Did the changing of the ports go EVDO !?
we gone have to learn how to authenticate to the sweet little thing arent we then..

BTW, thats an important link up there, lots of good stuff. bares repeating.
__________________
Which way to the java script for dummies thread ?
tweaka is offline   Reply With Quote
Old 02/16/2010, 11:43 PM   #38 (permalink)
Member
 
Join Date: Aug 2009
Posts: 2
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For other readers' info, the following works fine too:

sudo /sbin/stop mobi.optware.lighttpd

sudo /sbin/start mobi.optware.lighttpd
jasondet is offline   Reply With Quote
Old 02/17/2010, 06:52 AM   #39 (permalink)
Member
 
Join Date: Apr 2006
Posts: 184
Likes Received: 10
Thanks: 33
Thanked 29 Times in 16 Posts
Default password protect?

I like using this tool because it works well from any computer on the network with nothing more than a web browser. Of course it only works one way (from the pre, no write access that I know of). I've done some editing of the lighttpd.conf and got it mostly how I would like it other than a password.

Has anyone gotten theirs password protected? I tried loosly following instructions from here but I never get a password prompt. Anyone know a way to get password protection with lighttpd?
cdjh is offline   Reply With Quote
Old 02/17/2010, 06:59 AM   #40 (permalink)
Member
 
Join Date: Jun 2009
Posts: 360
Likes Received: 0
Thanks: 10
Thanked 66 Times in 35 Posts
Default

Those instructions would be the only way. Lighttpd does not support .htaccess like apache does, everything has to be done in the config file. Does this distribution come with that module?
joshewah is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0