muziling
V2EX  ›  问与答

tomcat 绑定二级域名,为什么有时候可以,有时候不可以

  •  
  •   muziling · Sep 18, 2015 · 2763 views
    This topic created in 4072 days ago, the information mentioned may be changed or developed.
    比如域名 www.xxx.com 和 test.xxx.com 都在 DNS 服务商那里指向同一个 IP,
    tomcat 的 server.xml 配置两个 host , hostname 分别设置为 www.xxx.com 和 test.xxx.com

    有时候通过 test.xxx.com 访问能正确访问 test 对应的 tomcat 工程,有时候却错误访问到 www.xx.com 对应的 tomcat 工程。
    2 replies  •  2015-09-18 09:19:23 +08:00
    mittya
    mittya
    Sep 18, 2015
    1
    你最好帖出来 server.xml 对应的配置
    niko
    niko
    Sep 18, 2015
    2
    建议前面加 apache/nginx ,让 tomcat 躲在后面。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2411 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 11:58 · PVG 19:58 · LAX 03:58 · JFK 06:58
    ♥ Do have faith in what you're doing.