webOS Nation Forums
> Homebrew
> WebOS Internals
>
Lighty Web Server - lighttpd on your Pre
1 2
3 4 5 6
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
Member:
R_E
at: 04:48 AM 01/26/2010
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
[/CODE]
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?
Member:
jasondet
at: 09:12 PM 01/31/2010
Originally Posted by rwhitby:
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?
Developer:
rwhitby
at: 09:51 PM 01/31/2010
Originally Posted by jasondet:
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
Originally Posted by R_E:
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
Member:
R_E
at: 12:02 AM 02/01/2010
Originally Posted by rlanza1054:
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?
Member:
daventx
at: 11:25 PM 02/08/2010
Originally Posted by R_E:
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:
Originally Posted by :
exec /opt/sbin/lighttpd -D -f /opt/etc/lighttpd/lighttpd.conf
Which doesn't even exist anymore at that location. I tried using this:
Originally Posted by :
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
Developer:
rwhitby
at: 11:31 PM 02/08/2010
/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
Member:
daventx
at: 11:41 PM 02/08/2010
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?
Developer:
rwhitby
at: 11:52 PM 02/08/2010
Originally Posted by daventx:
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
Developer:
rwhitby
at: 12:45 AM 02/09/2010
Version 1.4.25-5 released.
Make sure you install with Preware, so that the pcre package is also updated.
-- Rod
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!!
Developer:
rwhitby
at: 04:26 PM 02/09/2010
Originally Posted by Tonino ZGZ:
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
Member:
miketou
at: 03:27 AM 02/10/2010
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
Member:
miketou
at: 01:21 PM 02/10/2010
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?
Member:
tweaka
at: 10:03 PM 02/16/2010
@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.
Member:
jasondet
at: 12:43 AM 02/17/2010
For other readers' info, the following works fine too:
sudo /sbin/stop mobi.optware.lighttpd
sudo /sbin/start mobi.optware.lighttpd
Member:
cdjh
at: 07:52 AM 02/17/2010
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?
Member:
joshewah
at: 07:59 AM 02/17/2010
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?
1 2
3 4 5 6
webOS Nation Forums
> Homebrew
> WebOS Internals
>
Lighty Web Server - lighttpd on your Pre