Java最常实用的服务软件应该就是Tomcat了,前段时间也说过,赶在腾讯云搞活动的时间,把dotnetcore.com.cn、ide.net.cn还有xiangcaowuyu.net几个域名也一起备案了。最近想着用Java新建一个网站。
Tomcat配置多个域名还是很简单的,仍然是通过server.xml进行配置。
<!--xiangcaowuyu配置-->
<Host name="xiangcaowuyu.net" 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" />
-->
<Context docBase="XiangCaoWuYu" path="" />
<!-- 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 "%r" %s %b" />
</Host>
<!--dotnetcore配置-->
<Host name="dotnetcore.com.cn" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context docBase="DotNetCore" path="" />
<!-- 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 "%r" %s %b" />
</Host>
qweqweqweqweqweqw水电费水电费
可以的,我就是win10