I just upgraded my development computer to Mac OS 10.7.3 (Lion) from Mac OS 10.5.8 (Leopard), which required a complete disk erasure. For several years I've used MAMP to run a development server on the machine, along with minor changes to /et/hosts and httpd.conf in order to allow for virtual hosts. Instead of re-installing MAMP, I decided to install MySQL and configure Lion's native Apache and PHP software for my development needs, following the instructions I found here.
Everything worked fine until I tried to make some customizations to emulate the development environment to which I'm accustomed. In particular, I need:
- Apache to execute any custom .htaccess directives on a site-by-site basis
- To enable virtual hosts so that I can access my development sites at domains that I define
- To keep my Sites directory in
/Users/username/Dropbox/instead of in
/Users/username/for automated synching
I'm no Apache wizard, and every time I enable some option to get one of the above working, it causes 403 Forbidden errors when accessing any site in the user directory. I've read dozens of threads here on Superuser and other sites, and tried at least a hundred configurations of httpd.conf, extra/httpd-userdir.conf, extra/httpd-vhosts.conf, and users/username.conf, but none of them seem to help. I've also watched the error and access logs, but I'm not sure how to interpret the results.
This is way over my head, and I'd appreciate any help troubleshooting this. I'm not sure what other information might be helpful. If anyone can point me to a simple step-by-step guide that shows how to configure Apache on OS 10.7 for virtual hosts, .htaccess, and designating a different Sites directory, that would be even better.
Edit: Here's a sample error I get when I change the directory in users/username.conf to /Users/username/Dropbox/Sites/, without making any changes related to .htaccess or virtual hosts:
127.0.0.1 - - [17/Apr/2012:16:45:11 -0400] "GET /~john HTTP/1.1" 403 207
[Tue Apr 17 16:45:11 2012] [error] [client 127.0.0.1] client denied by server configuration: /Users/john/Sites