Virtual host
When you configure WAS, you can associate a virtual host to one or more Web Modules. Each Web Module can be associated with one and only one virtual host. Each virtual host represents a virtual configuration that can have one or more Domain Name System (DNS) aliases. A DNS alias consists of a TCP/IP host name and port number used to request the servlet (for example, yourhost:8000). A virtual host can be associated with any number of DNS aliases.
A client request for a servlet, JavaServer Pages (JSP) file, or related resource contains a DNS alias and a Uniform Resource Indicator (URI) that is unique to that resource. When a client request for a servlet, JSP file, or related resource is received, the DNS alias is compared to the list of all known virtual host groups to locate the correct virtual host, and the URI is compared to the list of all known URI groups to locate the correct URI group.
If a matching virtual host group or URI group is not found, an error is returned to the browser. If the virtual host group and URI group are found, the request is sent to the corresponding server group for processing and a response is returned to browser.
The first time that you start the WAS application server, a default virtual host (named default_host) is configured. The DNS aliases for the default virtual host are configured as *:80 and *:9080, where port 80 is the HTTP server port and port 9080 is the port for the default server's servlet engine. Because the transport type used to communicate to the WAS is HTTP, WAS is capable of accepting requests directly from the browser.
Use the administrative console to add or change DNS aliases if you want to use ports other than the default ports listed above. If you do make a change to the DNS aliases, also regenerate the plug-in configuration, which can also be done from the administrative console. These are some situations in which you need to make additions or changes:
- The HTTP server instance is running on a port other than 80. Add the correct port number to each of the aliases. For example, change yourhost to yourhost:8000.
- If you want to make HTTPS requests, which use Secure Sockets Layer (SSL), add port 443 to each of the aliases. Port 443 is the default port for SSL requests. If your Web server (HTTP server) instance is listening for SSL requests on a port other than 443, add that port number to each of the aliases.
- You want to use a port for the application server other then default port (9080).
- You want to use other aliases that are not listed.
The virtual host also maintains a list of Multipurpose Internet Mail Extensions (MIME) types that it processes. MIME is an Internet standard for multimedia e-mail, including graphics, audio, and fax.