Ubuntu14下禁止通过IP来访问web服务

ubuntu apache2的禁止IP访问在etc/apache2/sites-available/000-default.conf
其他linux系统的Apache的配置文件是httpd.conf  而并非Ubuntu下的

NameVirtualHost 145.32.22.52:80
<virtualhost 145.32.22.52:80>
ServerName 145.32.22.52
<Location />
Order Allow,Deny
Deny from all
</Location>
</virtualhost>

<virtualhost 145.32.22.52:80>
ServerName www.baidu.com
DocumentRoot /var/www/html/3d   //网站路径
</virtualhost>


http://www.tecbbs.com/thread-2556-1-1.html

猜你喜欢

转载自gaoziqiang.iteye.com/blog/2316671