简体   繁体   English

Apache 403错误WampServer 2

[英]Apache 403 Error WampServer 2

I have WampServer 2 installed and I have created an alias on my computer called test which points to directory g:/test/. 我安装了WampServer 2,并在我的计算机上创建了一个名为test的别名,该别名指向目录g:/ test /。

However I keep getting a 403 error when I try and access localhost/test/ 但是当我尝试访问localhost / test /时,我一直收到403错误

Which is being caused by these lines in my httpd.conf (if I comment these lines out it loads) 这是由我的httpd.conf中的这些行引起的(如果我将这些行注释掉它加载)

<Directory />
    AllowOverride none
    Require all denied
</Directory>

My conf for test is as follows: 我的测试内容如下:

Alias /test/ "g:/test/" 
<Directory "g:/test/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order allow,deny
    Allow from all
</Directory>

How do I override the Require all denied in my test.conf file to stop the 403 errors? 如何在test.conf文件中覆盖Require all denied以停止403错误?

Error Log reads: [Sun Dec 09 18:51:23.757803 2012] [authz_core:error] [pid 5128:tid 884] [client ::1:50622] AH01630: client denied by server configuration: G:/test/ 错误日志读取:[Sun Dec 09 18:51:23.757803 2012] [authz_core:error] [pid 5128:tid 884] [client :: 1:50622] AH01630:客户端被服务器配置拒绝:G:/ test /

Access Log reads: ::1 - - [09/Dec/2012:18:51:23 +0000] "GET /test/ HTTP/1.1" 403 207 访问日志读取::: 1 - - [09 / Dec / 2012:18:51:23 +0000]“GET / test / HTTP / 1.1”403 207

Try to replace deprecated: 尝试替换已弃用的:

Order allow,deny
Allow from all

By: 通过:

Require all granted

Concerns only Apache >= 2.4 . 仅关注Apache> = 2.4 However, I recommand to disable mod_access_compat (line LoadModule) to avoid Order/Allow/Deny conflicts with Require. 但是,我建议禁用mod_access_compat(行LoadModule)以避免与Require的Order / Allow / Deny冲突。

Options Indexes FollowSymLinks MultiViews AllowOverride all Allow from all #Require local Require all granted 选项索引FollowSymLinks MultiViews AllowOverride all允许来自所有#Require local要求所有已授予

above file comment #Require local add extra Require all granted 上面的文件评论#Require local add extra 要求全部授予

solved 解决了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM