Apache OSX Lion 403 Forbidden Problem

I had to set up multiple development sites using the Apache virtual hosting. All were coming back with the dreaded 403 page.

I did a lot of research and nothing seemed to work.

Finally, I found something that did. My virtual hosts were all running within directories that I had set up outside the /Library/Webserver location. I didn’t want to move the directories there and I didn’t want to sym link my directories to there either.

I found a line in the http.conf file

User _www
Group _www

I changed it to

User kevinsaunders
Group staff

All fine, except that PHP wasn’t allowed to set a session file in /var/tmp.

sudo chown -R kevinsaunders:staff /var/tmp/*

That seemed to fix it all.