apache 設定禁止用ip連網頁
我們常常為了資安的因素而需要進行許多複雜的設定,本次實作禁止用ip當網址開啟網頁,作法如下:
NameVirtualHost *:80
<VirtualHost *:80>
<Location />
Order deny,allow
Deny from all
</Location>
# other configuration for default host...
</VirtualHost>
<VirtualHost *:80>
# This is the one you would like visible
ServerName test.local
<Location />
Order deny,allow
Allow from all
</Location>
</VirtualHost>
留言
張貼留言