How requests map to virtual host aliases

 

When you request a resource, WAS tries to map the request to an alias of a defined virtual host.

Mappings are case insensitive, but the match must be alphabetically exact. Also, different port numbers are treated as different aliases.

For example, the request...

http://www.myhost.com/myservlet

...maps successfully to...

http://WWW.MYHOST.COM/MYSERVLET

...and to...

http://Www.Myhost.Com/Myservlet

But it does not map successfully to...

http://myhost/myservlet

or to...

http://myhost:9876/myservlet

One can use wildcard entries for aliases by port and specify that all valid hostname and address combinations on a particular port map to a particular virtual host.

If you request a resource using an alias that cannot be mapped to an alias of a defined virtual host, you receive a 404 error in the browser used to issue the request. A message states that the virtual host could not be found.


Configure virtual hosts