Re: khttpd: Virtual domain support alpha code

Arjan van de Ven (arjan@fenrus.demon.nl)
Sat, 4 Sep 1999 10:12:43 +0200


In article <Pine.LNX.4.10.9909040003020.7078-100000@cyrix200.lameter.com> you wrote:
> One thing that I always need from a webserver is virtual domain support.
> Sadly khttpd does not provide that. Attached is a patch that tries to
> implement virtual domain support in khttpd.

I was saving that for later, but if people want it and Linus doesn't mind
adding new features... why not.

> There is a new file /proc/sys/net/khttpd/virtual controlling virtual
> domain behavior. The following values can be set

> 0 Default. No change.
> 1 Virtual IP mode. Serve files from
> <documentroot>/<AAA.BBB.CCC.DDD>/filename
> 2 Virtual Host mode. Server files from
> <documentroot>/<hostname>/filename

Sorry to say so, but although this works, I don't think it is flexible
enough. I really would like to have a dynamic mapping between host ->
documentroot. Having said that, this system is a good start... (So unless
anyone comes up with a better one, this is it for now)

> Mode 1 is broken since I did not have the time to track down how to get
> the bound IP for the "struct socket" in the khttpd request structure.

That can be done easily. I'll send you a patch for this later today.

> And I am not sure that the composition of the filename really belongs into
> the rfc.c source. But moving that would require changing lots of things.
> Not sure also if all my string arithmetic is that clean.

I'll check your code soon and add the IP-mode thing.

One question to l-k/Linus: Is the feature-freeze in effect or can something
like this be added to the kernel?

Greetings,
Arjan van de Ven

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/