美文网首页PHP
(MAC) Apache You don't have

(MAC) Apache You don't have

作者: 887d1fc86fe6 | 来源:发表于2018-09-10 12:03 被阅读0次

Apache httpd.conf 我在默认权限上面修改了下路径,其他都没改动:

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

DocumentRoot "/Users/xxx/Desktop/Project/PhpStorm"
<Directory "/Users/xxx/Desktop/Project/PhpStorm">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options FollowSymLinks Multiviews
MultiviewsMatch Any

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   AllowOverride FileInfo AuthConfig Limit
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>

于是报错: You don't have permission to access / on this server.
Windows上没有出现这个问题。 因为这个是Mac用户权限问题。
我把路径的每一个文件夹打开看下了下用户权限,最大发现没有权限访问 Desktop 文件,于是修改为 只读 即可:

4F5BBD27-DAC4-4E78-B2AC-4AE5080BE5E0.png

建议逐个文件看下用户权限是否打开,我也是一个一个文件找的。

另外: 配置虚拟主机时,对于根目录给与的权限不对也会报这个错。

相关文章

网友评论

    本文标题:(MAC) Apache You don't have

    本文链接:https://www.haomeiwen.com/subject/fsqsgftx.html