Well, a reverse proxy is definitly what you want :-)
And, you're lucky, because lighttpd can do this.
You should take a look at the proxy module for lighttpd.
I'm currently experimenting with openwrt kamikaze on a Netgear WGT634U, and I have installed lighttpd with a some modules, including mod_proxy.
I want to be able to distribute http requests depending on the target hostname to multiple web servers behind the router in a special DMZ vlan and to the router itself (for online statistics with rrdtool).
So, lighttpd listens on my public IP, port 80, gets the http request, looks for what hostname it is, and forwards it to a web server in the DMZ or handles it itself.
It's very simple to configure, and very powerful.
Example in lighttpd.conf
server.modules = (
...
"mod_proxy",
...
)
# Forward all requests for *.mydomain.com
$HTTP["host"] =~ "(^|\.)mydomain\.com$" {
proxy.server = (
"" => (
(
"host" => "192.168.254.2",
"port" => 80
)
)
)
}
You can use the above code multiple times with different hostnames and servers.
Hostnames not handled by above statements are processed by lighttpd itself.
I hope this is what you want.
Martin
P.S. I will upgrade my WL-500gx from Oleg's FW to openwrt kamikaze too, when the WGT634U is running as a replacement...
The kernel question (2.4 or 2.6) is still open.