king

Apache禁止域名恶意指向自己网站的方法

king apache 2018-06-10 2531浏览 0

我们默认安装apache后默认网站是可以通过ip访问的,所以可能会有些不法分子恶意的解析域名指向你的网站。给你的网站带来损害。

遇到这种情可以建一个默认的站点 (注意,要保证这个的站点在所有站点的最前面,可以通过ip直接访问此站)


<VirtualHost *:80> 
ServerAdmin webmaster@localhost 
DocumentRoot /var/www 
<Directory /> 
Options Indexes FollowSymLinks MultiViews 
AllowOverride None 
Order deny, 
deny from all #直接屏蔽所有人访问 
</Directory> 
ErrorLog ${APACHE_LOG_DIR}/error.log 
LogLevel warn 
CustomLog ${APACHE_LOG_DIR}/access.log combined 
</VirtualHost>


继续浏览有关 apache 的文章
发表评论