On Fri, Dec 11, 2020 at 4:05 PM Eric House <[email protected]> wrote: > > There seems to be a lot of OpenWRT expertise on this list. Having > failed to find an answer by googling, I'm posting with crossed > fingers. > > At home I run a webserver for goofing around. I've only had one domain > hosted there and so OpenWRT needed only to forward all traffic on 80 > and 443 to the VM for that domain. Now I want to add a second domain. > Rather than add a second server config to nginx on the VM I want > OpenWRT to forward to a different LAN host based on the domain > targeted by incoming http{,s} traffic.
OpenWrt is only going to see an IP address, so it doesn't know how to port forward any differently, unless you have multiple IP addresses, which would be unusual. I'd sink the effort into learning nginx configuration of a second domain on the same server if I were you. Or, as Tomas suggests, configure it to proxy to connection to a different local server. > [...] And given that OpenWRT doesn't seem to handle upgrades very > well once you have non-stock packages involved I'm not confident the > setup will remain trouble-free. Bear in mind that OpenWrt is designed to fit into the storage space equivalent to a handful of floppy disks, running a modern kernel and userspace. In order to optimize the space it has, it does normally make a lot of that storage space immutable, which makes in-place upgrades difficult. However, if you have a set of packages you want, you can either build it from source, or use the ImageBuilder (I have less experience with the latter, I tend to build whole firmwares from source) to integrate your packages into the squashfs integrating your own configuration, and then you can turn out your own versions as often as you like, trading off your compile time and configuration maintenance effort. There are some OpenWrt tricks to building exactly what you want, .config stubs to start from, a files overlay that gets integrated into your firmware so it works on first boot with no post installation twiddling. -- Russell Senior [email protected] _______________________________________________ PLUG: https://pdxlinux.org PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
