如:我们要做pan.lfsenior.cn的映射
一、打开conf下的service.xml文件
在文件的末尾添加一个<host>节点即可
如:
<Host name="localhos" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
<Host name="pan.lfsenior.cn" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="BaiduYunSearch" debug="0" reloadable="true" />
</Host>
二、如何在本机测试,还需配置C:\Windows\System32\drivers\etc\hosts
如:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 pan.lfsenior.cn
三、接下来就可以通过pan.lfsenior.cn进行访问