Posted on 2009-06-27 16:46
J2EE Home工作室 阅读(760)
评论(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