zhuccc
V2EX  ›  Docker

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

  •  
  •   zhuccc · Dec 26, 2018 · 3020 views
    This topic created in 2772 days ago, the information mentioned may be changed or developed.
    有 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>
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   906 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 21:23 · PVG 05:23 · LAX 14:23 · JFK 17:23
    ♥ Do have faith in what you're doing.