tomcat配置Host

来源:互联网 发布:sql isexits常数 编辑:程序博客网 时间:2024/04/30 02:50
Host Name Aliases

In many server environments, Network Administrators have configured more than one network name (in the Domain Name Service (DNS) server), that resolve to the IP address of the same server. Normally, each such network name would be configured as a separate Host element in conf/server.xml, each with its own set of web applications.

However, in some circumstances, it is desirable that two or more network names should resolve to the same virtual host, running the same set of applications. A common use case for this scenario is a corporate web site, where it is desirable that users be able to utilize either www.mycompany.com or company.com to access exactly the same content and applications.

This is accomplished by utilizing one or more Alias elements nested inside yourHost element. For example:

<Host name="www.mycompany.com" ...>  ...  <Alias>mycompany.com</Alias>  ...</Host>

In order for this strategy to be effective, all of the network names involved must be registered in your DNS server to resolve to the same computer that is running this instance of Catalina.

0 0