2.4.2后版本的apache中需要在目录下面添加 Require all granted,否则无论怎么访问都是403

http://ylw6006.blog.51cto.com/470441/965119

 

注意:2.4.2版本的apache中需要在目录下面添加 Require all granted,否则无论怎么访问都是403,悲了个催的!具体报错如下:

[Fri Aug 10 19:07:13.263893 2012] [authz_core:error] [pid 8918:tid 1126259008] [client 192.168.123.102:53420] AH01630: client  denied by server configuration: /tmp

  1. [root@db1 ~]# grep -v '^#' /usr/local/apache/conf/extra/httpd-vhosts.conf |grep -v '^$'  
  2. <VirtualHost *:80
  3.     ServerName 192.168.123.110   
  4.     <Location /> 
  5.     Order deny,allow  
  6.     Deny from all  
  7.     </Location
  8. </VirtualHost
  9. <VirtualHost *:80
  10.     ServerName   www.yang.com  
  11.     DocumentRoot /tmp  
  12.     <Directory /tmp
  13.      Options +indexes  
  14.      Order allow,deny  
  15.      Allow from all  
  16.      Require all granted   
  17.     </Directory
  18. </VirtualHost
posted @ 2014-09-28 18:21  陳聽溪  阅读(30000)  评论(0编辑  收藏  举报