upload log files to lighttpd, read using javascript html page

364 views Asked by At

i'm using my beaglebone as my host device that's running lighttpd. my beaglebone is running another program that creates .log files.

I want to be able to connect my beaglebone to a laptop, open up the webpage that lighttpd's running and choose the .log file to review and be able to review it.

I assume this means I would have to

1) upload .log files to lighttpd server

2) html/js script to choose from these log files and view

I currently have a javascript/html file that lets me choose a file and displays it - but only on the local server (so from my laptop instead of the specific beaglebone logs folder)

If this is the right way to go about it, can anyone help me get started with some links/info? I've never worked with lighttpd/javascript before.

if not, point me in the right direction.

the current tutorial i'm looking at is http://www.alecjacobson.com/weblog/?p=1645&cpage=1#comment-311815 to create the javascript/html file

1

There are 1 answers

0
gstrauss On

You can have a folder in on the beaglebone which contains logs and you can list the contents of the directive with mod_dirlisting.

https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModDirlisting

You can use mod_alias to map the folder into your web server docroot.

https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModAlias

You should probably restrict access to view the logs using mod_auth.

https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModAuth