macOS Sierra更新使我的Apache本地主机无法访问。那么,只有localhost/
可以访问。但是localhost/<other-directory>/
下的子文件夹是NOT。Apache Localhost 403禁止使用macOS Sierra
如何解决?
macOS Sierra更新使我的Apache本地主机无法访问。那么,只有localhost/
可以访问。但是localhost/<other-directory>/
下的子文件夹是NOT。Apache Localhost 403禁止使用macOS Sierra
如何解决?
这里我也跟着解决这个问题的步骤:
转至/私人的/ etc/apache2的 打开httpd.conf.bak,复制的内容,覆盖httpd.conf中与它然后保存
在httpd.conf中,变化
Options FollowSymLinks Multiviews
到
Options FollowSymLinks Multiviews Indexes
更改
DocumentRoot "/Users/username/Sites"
<Directory "/Library/WebServer/Documents">
到
DocumentRoot "/Users/username/Sites"
<Directory "/Users/username/Sites">
然后保存
检查/用户/目录,并去你* .conf文件,并检查它类似于如下:
<Directory "/Users/username/Sites/">
Options Indexes MultiViews
AllowOverride All
# OSX 10.10/Apache 2.4
Require all granted
</Directory>
然后运行sudo apachectl restart
然后应该工作:-)
检查http://stackoverflow.com/a/39702677/486508 – Hesham
重新安装为我做了。发现这个完整的安装指南是最好的:https://jason.pureconcepts.net/2016/09/install-apache-php-mysql-mac-os-x-sierra/ – doncadavona