Virtual hosts on HTTP Server

 

This topic provides information about virtual host types on the HTTP Server for i5/OS.

Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . IBM recommends that you install the latest PTFs to upgrade to the latest level of the HTTP Server for i5/OS. Some of the topics documented here are not available prior to this update. See IBM Service for more information.

The concept of virtual hosts allows more than one Web site on one system or Web server. The servers are differentiated by their host name. Visitors to the Web site are routed by host name or IP address to the correct virtual host. Virtual hosting allows companies sharing one server to each have their own domain names. For example www.company1.com and www.company2.com can both be hosted on the same server.

 

HTTP Server (powered by Apache) virtual host types

There are three variations of virtual hosts on HTTP Server (powered by Apache):

IP address-based virtual host

The IP address-based virtual host requires one IP address per Web site (host name). This approach works very well, but requires a dedicated IP address for every virtual host. For more information on virtual hosts refer to the <VirtualHost> directive.

Name-based virtual host

The name-based virtual host allows one IP address to host more than one Web site (host name). This approach allows practically an unlimited number of servers, ease of configuration and use, and requires no additional hardware or software. The main disadvantage to this approach is that the client must support HTTP 1.1 (or HTTP 1.0 with 1.1 extensions) that include the host name information inside the HTTP document requests. The latest versions of most browsers support HTTP 1.1 (or HTTP 1.0 with 1.1 extensions), but there are still old browsers that only support HTTP 1.0. For more information on virtual hosts refer to the <VirtualHost> directive.

For information on how to configure a name-based virtual host see JKL Toy Company creates virtual hosts on HTTP Server (powered by Apache).

Dynamic virtual host

The dynamic virtual host allows you to dynamically add Web sites (host names) by adding directories of content. This approach is based on automatically inserting the IP address and the contents of the Host: header into the pathname of the file that is used to satisfy the request.

The advantages of a dynamic virtual host are:

  • A smaller configuration file so that the server starts faster and uses less memory.

  • Adding virtual hosts does not require the configuration to be changed or the server to be restarted.

The disadvantage of a dynamic virtual host is that you cannot have a different log file for each virtual host. For more information on dynamic virtual hosts refer to mod_vhost_alias.

For information on how to configure dynamic virtual hosts on HTTP Server (powered by Apache) see Setting up virtual hosts on HTTP Server (powered by Apache).

 

Parent topic:

Concepts of functions of HTTP Server