如何在Tomcat 8中设置虚拟主机

时间:2015-07-09 17:52:36

标签: tomcat

我正在尝试为Tomcat 8中的一个webapp设置虚拟主机,该主机在端口8080上运行。

http://localhost:8080/cicd-demo效果很好!

www.cicd-demo.com不起作用!!!!

错误日志:

The server at www.cicd-demo.com can't be found, because the DNS lookup failed.

server.xml配置

  <Host name="cicd-demo.com"  appBase="webapps" unpackWARs="true" autoDeploy="true">
    <Alias>www.cicd-demo.com</Alias>
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="cicd_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
    <Context path="" docBase="C:/apache-tomcat/webapps/cicd-demo" debug="0" reloadable="true"/>
  </Host>

我是否必须在某处配置端口8080?我错过了什么?

0 个答案:

没有答案