How do I change apache2 DocumentRoot (default snow leopard install) and not get "You don't have permission to access / on this server."
I'm trying to point DocumentRoot at a directory in my user folder. While I can happily point DocumentRoot at /Library/WebServer/Documents
and ~/Sites
I keep getting
You don't have permission to access / on this server.
when I point it anywhere else.
I just found a solution mid-question (Stack Overflow is just that good) by changing the user/group apache runs under to myuser/admin. I'm sure there m开发者_StackOverflowust be a better way though. Surely some kind of permissions magic on the directory I'm pointing at?
Change the permissions (not necessarily the owner) to allow the directory you're sharing as the website to be allowed to be read by the user that the web server daemon is running under.
精彩评论