[求助] apache 如何设置禁止IP直接访问

就是设置一个servername是本机IP地址的虚拟主机,然后deny all 就好了。
正确做法:
<VirtualHost *:80>
    DocumentRoot "..\$PATH\deny"
    ServerName *
    <Directory "..\$PATH\deny">
    Order deny,allow
    Deny from all
   </Directory>
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "..\$PATH"
    ServerName www.xxxx.com
</VirtualHost>