您的位置:首页 > 运维架构 > 网站架构

配置域名访问本地网站(配置server.xml)

2007-04-15 11:29 330 查看
第一步:配置server.xml文件。
<Host name="diy.com" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context Path="" reloadable="true" docBase="D:/workspace/diy"/>
</Host>


</Engine>

</Service>

</Server>

上面加上上面的代码。
注:
docBase:表示工程所在目录。工程是发表后和发表前好像都可。

第二步:修改hosts文件。
hosts文件位置”C:/WINDOWS/system32/drivers/etc/hosts“。

127.0.0.1 localhost
下面加上
127.0.0.1 diy.com

输入http://diy.com:8080即可访问。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: