9.另外还可以查看日志文件就能更清楚的看出访问的情况
能够正常访问的记录放在 /var/log/httpd下的日志文件里
[root@localhost httpd]# pwd
/var/log/httpd
[root@localhost httpd]# ll
总计 24
-rw-r--r-- 1 root root 6618 10-11 15:51 access_log ß能够访问的记录
-rw-r--r-- 1 root root 7811 10-11 15:51 error_log ß不能访问的记录
[root@localhost httpd]# vim access_log
192.168.1.30 - user1 [11/Oct/2012:13:22:41 +0800] "GET / HTTP/1.1" 401 479 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Window
s NT 5.1; Trident/4.0)"
可以看到测192.168.1.30 user1成功访问
[root@localhost httpd]# vim error_log
[Thu Oct 11 15:48:35 2012] [error] [client 192.168.1.25] client denied by server configuration: /public/
[Thu Oct 11 15:51:02 2012] [error] [client 192.168.1.95] client denied by server configuration: /public/
可以看到被拒绝的ip地址
最后注意:配置服务器时一定要把防火墙关掉。
