如何配置apache,使其拒绝直接连接到IP地址(http://xxx.xxx.xxx.xxx)而不是虚拟主机名http://example.com的连接?
我的VirtualHost配置:
ServerName example.com
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/
<Directory /var/www/>
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>