apache设置禁止访问
1、在/usr/local/apache2/htdocs/目录下写一个.txt文件# echo "1212" >1.txt 2、改写配置文件
# vim /usr/local/apache2/conf/httpd.conf
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Deny from all
3、重启Apache
# /usr/local/apache2/bin/apachectl restart4、访问测试
# curl 192.168.0.104/1.txt -I
curl: (7) couldn't connect to host
页:
[1]