在tomcat中配置多个域名的多个项目:server.xml中,加以下:
<Host name="xxx.cc" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<
Alias
>
www.xxx.cc
</
Alias
>
<
Context
path
=""
docBase
="
xxx
"
debug
="
0
"
reloadable
="
true
" />
- <!--
SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html
-->
- <!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
</
Host
>
-
<
Host name
="yyy
.cc
"
appBase
="
webapps
"
unpackWARs
="
true
"
autoDeploy
="
true
"
xmlValidation
="
false
"
xmlNamespaceAware
="
false
">
<
Alias
>
www.yyy.cc
</
Alias
>
<
Context
path
=""
docBase
="
yyy
"
debug
="
0
"
reloadable
="
true
" />
- <!--
SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html
-->
- <!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
</
Host
>