同一个目标,同一个梦想

One Target,One Dream
posts - 25, comments - 11, trackbacks - 0, articles - 37

Tomcat 6.18 Virtual Host

Posted on 2009-06-27 16:46 J2EE Home工作室 阅读(761) 评论(0)  编辑  收藏 所属分类: Apache + Tomcat
conf/server.xml
 
<Engine name="Catalina" defaultHost="localhost">
 
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

</Host>

<Host name="www.host01.com" appBase="/opt/host01"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

</Host>

<Host name="www.host02.com" appBase="/opt/host02"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

</Host>
 
 
conf/Catalina/localhost/ROOT.xml:
    <Context path="" reloadable="false" docBase="" workDir="/tmp/tomcat" />

conf/Catalina/www.host01.com/ROOT.xml
    <Context path="" reloadable="false" docBase="" workDir="/tmp/host01" />

conf/Catalina/www.host02.com/ROOT.xml
<Context path="" reloadable="false" docBase="" workDir="/tmp/host02" />
 
 
 
 
参考:www.ex-parrot.com/~pete/tomcat-vhost.html

只有注册用户登录后才能发表评论。


网站导航: