开发者

How do I change apache2 DocumentRoot (default snow leopard install) and not get "You don't have permission to access / on this server."

开发者 https://www.devze.com 2022-12-31 07:20 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消