首页 > 其他 > 详细

tomcat的server.xml里host节点配置的一些说明

时间:2015-10-13 17:14:38      阅读:357      评论:0      收藏:0      [点我收藏+]

tomcat的server.xml里host节点配置的一些说明

公司里项目混乱,一直resin和tomcat7,8乱用,崽加上项目结构很垃圾,每次SVN下来的东西要重新配置;就需要研究一下server.xml的具体配置问题

tomcat8中:

    

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">

<!-- 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
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />

</Host>

  在上述</Host>节点前添加配置: 

  <Context path="" docBase="G:/apache-tomcat-8.0.24/webapps/newiims/" debug="0"/>

  name:对应的是你项目的域名;
appBase:虚拟目录的路径(用来运行jsp的目录);
doBase:项目的顶级目录就相当于webapps 中的目录名称,也就是iis中的网站根目录;
配置完成后记得把你的项目复制到D:\webroot目录下,我的项目是ecshoping

 

参考:http://www.jb51.net/article/51925.htm

tomcat的server.xml里host节点配置的一些说明

原文:http://www.cnblogs.com/mxh1099/p/4874974.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!