I was thinking about some simple web-interface for web-camera videos captured by motion, and come to conclusion that may be I must use lighthttpd - web-server for this. But then it come to my mind that OpenWRT already has web-interface under lighthhtpd! So, can I add my own menu item in, say, Serivces -> Videos?
Openwrt uses uhttpd, and yes you can add your own menu item.
OMG! That is amazing! How do I do that? Like that WPS button in LUCI web-interface on X86? - For Developers - OpenWrt Forum ? It seems rather simple solution. It would be nice if still actual.
Also, I think that use LuCi's uhttpd to give access to motion video files via WAN is not a good idea. It is ether too risky or too complicated. So, I will use lighthttpd for this in combination with port forwarding.
you're OK with using uhttpd for the routers config, but not for hosting videos ?
you said nothing about WAN in your earlier post ...
if you're exposing it to internet, use VPN.
Well, I was just thinking that uhttpd listens only LAN for security reasons and I must not change that behaviour.
I do not expose OpenWRT device to WAN, I use Keenetic device as Uplink to give OpenWRT device an Internet access, yet OpenWRT eth0 can recieve any uplink via DHCP. Yes, it is protected by VPN, and I was going to setup port forwarding on Keenetic device (for which I have some kind of white IP address) for lighthttpd OpenWRT web-server.
If I setup lighthhtpd server to "share" not defaut /www but /etc/motion/video instead, will it be OK?
Or I better setup motion with help of taget_dir driective to save video files to /www instead of /etc/motion/video ?
it binds to all interfaces, but the firewall stops it from being accessed via WAN.
root@T-56:/etc/config# cat uhttpd
config uhttpd 'main'
list listen_http '0.0.0.0:80'
list listen_http '[::]:80'
list listen_https '0.0.0.0:443'
list listen_https '[::]:443'
that's entirely up to you.
Thank you. As I understand it does not matter if I store motion video files to /www or setup lighthttpd default dir as /etc/motion/videos. I was thinking there are some "best practices" or something like that. Thank you again!