403 Forbidden error on Mac web server
After upgrading Mac OS, or attempting to start the Web Sharing service for the first time, you may find browsing to your document root causes a 403 Forbidden error to display. This is most likely because the Apache web servers HTTP config file is set to disallow access to the root directory - something that Mac OS should probably be automatically updating for you when you activate web sharing, but ah well!
Follow these steps to modify the Apache config to permit access to the root directory on your web server.
1) Open a Terminal and type sudo nano /private/etc/apache2/httpd.conf then press Return
The Apache HTTP config document is opened in the Terminal window.
2) Press Ctrl+W (where is) and type <Directory />
3) Press enter to perform the search.
The cursor moves to the start of the <Directory> block in the document.
4) Change the line Deny from all to Allow from all
5) Press Ctrl+O
6) Press Return to save the changes
7) Press Ctrl+X to close the document and exit back to the Terminal prompt.
8) Type sudo httpd -k restart at the Terminal prompt to restart your Apache 2 server
Now try browsing to your web root.
If that doesn't work:
By default, on any unix based operating system only root can bind a process to a port below 1024.
Your choices are to either use a port higher than 1023 and remember to specify it when you connect, or to ensure that you start Apache as root.
- Mac OS find files using regex
- ADB device driver won't install
- Eclipse: An error has occurred. See the log file .metadata/.log
- Updated blinkbox iPad app
- Nexus 7 doesn't appear in adb devices list
- Improve the keyboard in the Samsung ICS update
- Getting error with manually created NIB?
- Adding/removing items from PATH on Mac
- Presenting at Flash Oxford
- Failed to get the task for process xx
Places you'll find me:
- March 2017
- March 2017
- February 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016