From Bugzilla Helper: User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-21 i686; Nav) Description of problem: In kernel-2.4.9-21, the tux module behavior does not match what the documentation in tux-2.2.0-1 says the behavior for mass_hosting_hash is documented to do (or on http://www.redhat.com/docs/manuals/tux/TUX-2.1-Manual/virtual-hosting.html). The documentation says: If the value is set to 0, mass_hosting_hash is disabled. If the value is set to 1: http://www.some.site.com/a.html => docroot/s/some.site.com/a.html If the value is set to 2: http://www.some.site.com/a.html => docroot/s/so/some.site.com/a.html If the value is set to 3: http://www.some.site.com/a.html => docroot/s/so/som/some.site.com/a.html The reality (both according to the source code and experimentation is: 0 disable mass hosting 1 maps to docroot/s/so/some.site.com/a.html 2 maps to docroot/s/so/som/some.site.com/a.html 3 maps to docroot/some.site.com/a.html Please fix the source code and keep the functionality described by the documentation. Please see patch included in this bug report. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Setup tux with: echo 1 > /proc/sys/net/tux/virtual_server echo 1 > /proc/sys/net/tux/mass_hosting_hash Create a directory tree with all the various designs and try it out. 2. Read /usr/src/linux-2.4.9-21/net/tux/proto_http.c lines 1429 - 1461 3. Additional info: Here is a fix: --- net/tux/proto_http.c.orig Fri Feb 15 20:01:54 2002 +++ net/tux/proto_http.c Fri Feb 15 20:03:02 2002 @@ -1431,6 +1431,15 @@ case 0: return req->host; case 1: + // www.ABCDEFG.com => A/ABCDEFG.com + + tmp[0] = req->host[0]; + tmp[1] = '/'; + memcpy(tmp + 2, req->host, req->host_len); + tmp[req->host_len + 2] = 0; + + return tmp; + case 2: // www.ABCDEFG.com => A/AB/ABCDEFG.com tmp[0] = req->host[0]; @@ -1442,7 +1451,7 @@ tmp[req->host_len + 5] = 0; return tmp; - case 2: + case 3: // www.ABCDEFG.com => A/AB/ABC/ABCDEFG.com tmp[0] = req->host[0];
oops - this patch fell through the cracks. Patch applied.