macOS Sierra update made my Apache's localhost and now is inaccessible. I can only access localhost/
. But sub-folders under localhost/<other-directory>/
are not and a "403 forbidden access" error is shown.
Refresh the Page. Refreshing the page is always worth a shot. Many times the 403 error is temporary, and a simple refresh might do the trick. Most browsers use Ctrl+R on Windows or Cmd+R on Mac to refresh, and also provide a Refresh button somewhere on the address bar.
Here's the steps I followed to fix this:
Go to /private/etc/apache2 Open httpd.conf.bak, copy the contents, overwrite httpd.conf with it then save
In httpd.conf, change
Options FollowSymLinks Multiviews
to
Options FollowSymLinks Multiviews Indexes
Change
DocumentRoot "/Users/username/Sites" <Directory "/Library/WebServer/Documents">
to
DocumentRoot "/Users/username/Sites" <Directory "/Users/username/Sites">
Then save
Check the /users/ directory and go to your *.conf file and check it is similar to below:
<Directory "/Users/username/Sites/"> Options Indexes MultiViews AllowOverride All # OSX 10.10 / Apache 2.4 Require all granted </Directory>
Then run sudo apachectl restart
That should then work :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With