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