Windows上Tomcat上配置多个域名

(以google的域名为例)
step1:在c盘建两个文件夹 google ,在google文件上建ROOT文件,在这个文件中创建index.html
step2:在tomcat/conf/server.xml ,添加

	  <Host name="www.google.com"  appBase="c:/google"
            unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="baidu_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
      </Host>

step3:在c:/windows/system32/drivers/etc/hosts 文件中添加

127.0.0.1 www.google.com

猜你喜欢

转载自blog.csdn.net/qq_40893056/article/details/83020275