Using uHTTPd webserver for locally hosting html files besides luci

Using uHTTPd web server for local html files besides luci

I was wondering if it is possible to use the existing uHTTPd web server that hosts luci to host html files locally via a samba shared folder

My use case is I run a program called 'flexget' on a linux computer on my local network

I also have a samba shared folder on local network

flexget generates 3 html files(with the same name, basically overwrites) on my samba shared folder every time I run flexget

Android does not automount smb shared folder for the entire OS, only file explorer apps that can browse smb network can see those html files/folders, the path to the html file fails when opened on firefox for android because of this

I would ideally like to run the html without any authentication from the same router ip address (http://192.168.1.1/index1.html) and keep those html files(path to them) on the shared samba folder (so flexget can edit them) and open them on any device/browser connected to my network.

Thanks.

it is
soft link them, if you don't want to make copies.

1 Like

Could you please share how I can soft link or make this happen

Is there a doc I can follow, or did you mean creating a sym link somewhere

thank you

https://man7.org/linux/man-pages/man1/ln.1.html, the -s switch is a good start.

the web server files are stored in /www

1 Like

Yes, totally possible, you'll need to define another instance of uhttpd in the /etc/config/uhttpd and select a different port of course (or move the primary uhttpd instance to a port other than 80/443).

1 Like

it's not needed, you can host it in the default uhttpd, unless you want the uhttpd's home dir to point directly to the samba fs.

1 Like

Thanks, I'd prefer not running another instance, if possible

If I make a symbolic link like so

ln -s /www /mnt/usb-ntfs/samba/html

where /mnt/usb-ntfs/samba/html is the path to the folder thawill have the html files.

Will

  1. luci be affected
  2. I be able to open the html files in /mnt/usb-ntfs/samba/html via http://192.168.1.1/custom.html

Thanks

Edit:
Or will I have to create the individual html files in /www and sym link each of the 3 to the shared folder?
Eg:

ln -s /mnt/usb-ntfs/samba/html/1.html /www/1.html

ln -s /mnt/usb-ntfs/samba/html/2.html /www/2.html

ln -s /mnt/usb-ntfs/samba/html/3.html /www/3.html

the latter, but the syntax for the ln is wrong - reversed.

1 Like

thanks, got it

ln -s target_file link_name

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.