(以google的域名为例)
step1:在c盘建两个文件夹 google ,在google文件上建ROOT文件,在这个文件中创建index.html
step2:在tomcat/conf/server.xml ,添加
<Host name="www.google.com" appBase="c:/google"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="baidu_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
step3:在c:/windows/system32/drivers/etc/hosts 文件中添加
127.0.0.1 www.google.com