1、在/usr/local/apache2/htdocs/目录下写一个.txt文件
[root@localhost htdocs]# echo "1212" >1.txt
2、改写配置文件
[root@localhost htdocs]# vim /usr/local/apache2/conf/httpd.conf <Directory "/usr/local/apache2/htdocs"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Deny from all </Directory>
3、重启Apache
[root@localhost htdocs]# /usr/local/apache2/bin/apachectl restart4、访问测试
[root@localhost ~]# curl 192.168.0.104/1.txt -I curl: (7) couldn‘t connect to host
本文出自 “linux成长之路” 博客,请务必保留此出处http://linuxlovers.blog.51cto.com/6787002/1398322
原文:http://linuxlovers.blog.51cto.com/6787002/1398322