V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
muziling
V2EX  ›  问与答

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

  •  
  •   muziling · 2015-09-18 08:40:39 +08:00 · 1979 次点击
    这是一个创建于 3136 天前的主题,其中的信息可能已经有所发展或是发生改变。
    比如域名 www.xxx.comtest.xxx.com 都在 DNS 服务商那里指向同一个 IP,
    tomcat 的 server.xml 配置两个 host , hostname 分别设置为 www.xxx.comtest.xxx.com

    有时候通过 test.xxx.com 访问能正确访问 test 对应的 tomcat 工程,有时候却错误访问到 www.xx.com 对应的 tomcat 工程。
    2 条回复    2015-09-18 09:19:23 +08:00
    mittya
        1
    mittya  
       2015-09-18 09:16:31 +08:00
    你最好帖出来 server.xml 对应的配置
    niko
        2
    niko  
       2015-09-18 09:19:23 +08:00
    建议前面加 apache/nginx ,让 tomcat 躲在后面。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   864 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 21:51 · PVG 05:51 · LAX 14:51 · JFK 17:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.