Mass Virtual Hosting

Red Hat Content Accelerator supports mass virtual hosting, which enables a very high number of virtual hosts.

There are three tunables that deal with virtual hosting:

These three tunables depend on each other, and the strip_host_tail tunable is only used if host based virtual serving is enabled. Otherwise, it is ignored.

virtual_server

If the value is set to 0, virtual hosting is disabled:

http://www.example.com/a.html => $DOCROOT/a.html

If the value is set to 1, host-based virtual hosting is enabled:

http://www.some.site.com/a.html => $DOCROOT/some.site.com/a.html

NoteNote
 

Red Hat Content Accelerator strips off the www. prefix variants and transforms the hostname to lowercase.

If the value is set to 2, IP-based virtual hosting is enabled:

http://www.some.site.com/a.html => $DOCROOT/1.2.3.4/a.html

If the value is set to 3, a mixture of host-based and IP-based virtual hosting is enabled:

http://www.some.site.com/a.html => $DOCROOT/1.2.3.4/some.site.com/a.html

mass_hosting_hash

The mass_hosting_hash tunable modifies the hostname mapping to be more effective for a large number of hosts.

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

string_host_tail

The strip_host_tail tunable strips off hostname components, starting at the end of the hostname.

If the value is set to 0, this tunable is disabled.

If the value is set to 1:

http://www.some.site.com/a.html => $DOCROOT/some.site/a.html

If the value is set to 2:

http://www.some.site.com/a.html => $DOCROOT/site/a.html

and so on...