V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zhuccc
V2EX  ›  Docker

docker 跑 apache 、server name 不能是 abc.数字?

  •  
  •   zhuccc · 2018-12-26 09:16:18 +08:00 · 2489 次点击
    这是一个创建于 1919 天前的主题,其中的信息可能已经有所发展或是发生改变。
    有 A、B 两台主机
    apache 都是 2.2.32 版、A 主机是直接编译安装在系统内,B 主机是跑 docker
    C 主机上 /etc/hosts 写
    192.168.1.1 abc.1
    192.168.1.2 abc.2

    然后在 C 主机上跑
    curl http://abc.1/
    curl http://abc.2/

    A 主机会如预期回应正确的值
    B 主机会则回应
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>400 Bad Request</title>
    </head><body>
    <h1>Bad Request</h1>
    <p>Your browser sent a request that this server could not understand.<br />
    </p>
    <p>Additionally, a 400 Bad Request
    error was encountered while trying to use an ErrorDocument to handle the request.</p>
    </body></html>
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   945 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:04 · PVG 05:04 · LAX 14:04 · JFK 17:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.