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

2018-12-26 09:16:18 +08:00
 zhuccc
有 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>
2504 次点击
所在节点    Docker
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/521024

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX