有错误信息:
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.12 (Unix) OpenSSL/1.0.1m PHP/5.6.8 mod_perl/2.0.8-dev Perl/v5.16.3
我已将httpd.conf文件设置为以下内容:
Alias /myspace "/volumes/myspace/workspace/phpworkspace"
<Directory "/volumes/myspace/workspace/phpworkspace">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
#Require all granted
</Directory>
“/ volumes / myspace / workspace / phpworkspace”这个地方是我的代码所在 . 我尝试了很多方法:
2 回答
Order
指令应首先是Allow
,然后是Deny
.设置
Allow from all
并且不要为Deny
设置任何内容 .将您的
Directory
指令更改为此指令,它应该可以正常工作我已经解决了这个问题 .
在文件“httpd.conf”中,还有另一个默认的目录配置,如下所示:
您可以删除此目录或更改如下: