这个文件说
Due to the fact that www.example1.com is first in the configuration file,
it has the highest priority and can be seen as the default or primary server.
That means that if a request is received that does not match one of the specified
ServerName directives, it will be served by this first VirtualHost.
Run Code Online (Sandbox Code Playgroud)
如何禁用此功能,如果任何启用的虚拟主机不匹配,我不希望 apache 提供任何文件?
假设我有 2 台服务器。它们位于同一网络、同一子网和同一域中。一切都一样。
server1.something.internal -> 10.0.0.1
server2.something.internal -> 10.0.0.2
Run Code Online (Sandbox Code Playgroud)
所以我的问题是为什么我不能通过他们的 fqdn ping 主机?我想使用主机名和域名连接主机,而不是使用 ips
root@server1:~# ping server2.something.internal
ping: unknown host server2.something.internal
Run Code Online (Sandbox Code Playgroud)
主机是 Debian 6.0。主机名和域名设置正确。网络上没有 dns 或 dhcp 服务器。Ips 设置为静态。
这是etc/resolv.conf
两台服务器的
domain something.internal
search something.internal
nameserver 8.8.8.8
Run Code Online (Sandbox Code Playgroud)