我有同一个服务器IP地址的多个A记录,我的意思是:
URL DNS 资源。 goodurl.com 10.0.0.1 badurl1.com 10.0.0.1 badurl2.com 10.0.0.1
我想配置 Apache2 使其仅适用于 URL goodurl.com 而不适用于任何其他 URL。
我找到了在特定 URL“badurl1.com”上提供“拒绝访问”的方法,如下所示:
<VirtualHost *:80>
ServerName badurl1.com
DocumentRoot /var/www
<Directory /var/www/>
AllowOverride None
Order deny,allow
deny from all
</Directory>
</VirtualHost>
有没有更优雅、更有效的方法来做同样的事情?
有没有办法配置 Apache 以确保默认情况下拒绝任何其他未来和不需要的新 A 记录?
在此先感谢您的帮助
系统 SO:Linux 2.6.32-5-amd64 x86_64 GNU/Linux 服务器版本:Apache/2.2.16 (Debian)