Why am I getting 403 Forbidden after enabling HTTPS for Apache on Mac OS X?
- by Daryl Spitzer
I enabled HTTPS on the Apache server built-in to Mac OS X 10.6 (on my MacBook Pro) by uncommenting:
Include /private/etc/apache2/extra/httpd-ssl.conf
...in /etc/apache2/httpd.conf and modifying /etc/apache2/extra/httpd-ssl.conf to include:
DocumentRoot "/Users/dspitzer/foo/bar"
ServerName dot.com:443
ServerAdmin [email protected]
...
SSLCertificateFile "/private/etc/apache2/siab_cert.pem"
SSLCertificateKeyFile "/private/etc/apache2/siab_key.pem"
Then I restart apache (with sudo apachectl restart) and go to https://localhost/ in Safari, where I get:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.</p>
</body></html>
I've tried changing 443 in /etc/apache2/extra/httpd-ssl.conf to 8443 and going to https://localhost:8443/ and I get the same error.
I read http://serverfault.com/questions/88037/why-am-i-getting-this-403-forbidden-error and confirmed that execute permission is given for all parent directories of the vhost dir: /Users/dspitzer/foo/bar.
Is there a log file somewhere that might give me a clue?