禁止訪(fǎng)問(wèn)服務(wù)器IP,進(jìn)入默認(rèn)的網(wǎng)站,
例如:
輸入http://服務(wù)器IP地址 ,回車(chē)后默認(rèn)打開(kāi)網(wǎng)站。
處理方法:
[php]
<VirtualHost *:80>
DocumentRoot "/var/www/html"
ServerName www.test.com
<Directory "/var/www/html">
deny from all
</Directory>
</VirtualHost>
[/php]
或者指定IP地址
[php]
<VirtualHost IP地址:80>
DocumentRoot "/var/www/html"
ServerName www.test.com
<Directory "/var/www/html">
deny from all
</Directory>
</VirtualHost>
[/php]
發(fā)表評(píng)論