403禁止〜/ User / username / Documents文件夹中的〜/ Sites符号链接。似乎无法超越它

时间:2017-01-06 11:50:45

标签: macos apache permissions symlink

我知道这种问题已被多次提出,但我已经尝试过我找不到的解决方案。

我刚刚在MacOS Sierra上设置了放大器,〜/ Sites文件夹工作正常。

但是,我已经在我的Documents中的文件夹中添加了一个符号链接,比如/ User / username / Documents / website,但是这个文件夹没有在Web浏览器中显示,直接转到它就是403禁止错误。

我已尝试设置该文件夹的权限,但仍显示如下...

lrwxr-xr-x  1 username  staff  100  6 Jan 11:22 website -> /Users/username/Documents/website

1 个答案:

答案 0 :(得分:0)

我已通过将Apache用户设置为我的Mac帐户来克服此问题...

/etc/apache2/httpd.conf

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
#User _www
#Group _www

User 'mac account'
Group staff