<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
</Host>
name: 表示站點(diǎn)名稱顽聂。訪問(wèn)站點(diǎn)就是使用站點(diǎn)名稱。
appBases: 表示站點(diǎn)根目錄
站點(diǎn)和網(wǎng)站的關(guān)系盯仪?
一個(gè)站點(diǎn)可以包含多個(gè)網(wǎng)站紊搪。
一個(gè)網(wǎng)站就在一個(gè)站點(diǎn)中。
添加站點(diǎn):
1)在server.xml文件中添加host標(biāo)簽
2)在本地的hosts文件全景,中添加一個(gè)站點(diǎn)和ip地址的映射127.0.0.1 www.baidu.com
3)訪問(wèn)站點(diǎn)的百度音樂(lè)項(xiàng)目
http://www.baidu.com/music/index.html