简体   繁体   中英

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/.

However I keep getting a 403 error when I try and access localhost/test/

Which is being caused by these lines in my httpd.conf (if I comment these lines out it loads)

<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?

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/

Access Log reads: ::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 . However, I recommand to disable mod_access_compat (line LoadModule) to avoid Order/Allow/Deny conflicts with Require.

Options Indexes FollowSymLinks MultiViews AllowOverride all Allow from all #Require local Require all granted

above file comment #Require local add extra Require all granted

solved

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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