Apache 2.4.2无法访问错误代码为403的解决方法

来自:互联网
时间:2019-08-07
阅读:

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

[root@db1 ~]# grep -v '^#' /usr/local/apache/conf/extra/httpd-vhosts.conf |grep -v '^$'
<VirtualHost *:80>
  ServerName 192.168.123.110
  <Location />
  Order deny,allow
  Deny from all
  </Location>
</VirtualHost>
<VirtualHost *:80>
  ServerName   file.zyku.net
  DocumentRoot /tmp
    <Directory /tmp>
    Options +indexes
    Order allow,deny
    Allow from all
    Require all granted
    </Directory>
</VirtualHost>
返回顶部
顶部