Mac 10.7上配置Apache的目录,想指定到自定义目录一直不成功什么原因?

2012-08-08 10:33:53 +08:00
 jimmy
开启Web Share之后只修改了两处:
httpd.conf里开启了php5支持,Vhost支持。
然后在extra/httpd-vhost.conf里添加了个虚拟站点,使用sudo apachectl -t检查没问题,但是运行的时候却报403,不知道什么原因造成的,要怎么解决?
PS: 使用系统自带的路径访问却是正常的……

不小心发了一篇到MBP节点里,能不能删除啊那篇。
4124 次点击
所在节点    macOS
3 条回复
waredugu
2012-08-08 10:48:39 +08:00
還是自己編譯nginx吧
sephrioth
2012-08-09 19:13:38 +08:00
MAMP PRO 伺候...
quake0day
2012-08-10 08:55:12 +08:00
Create the directory structure
First set up the directory to hold the files, I call my directory public_beta in my home folder. I normally create a new directory in my home directory for each virtual host, but you could create sub directories under a main web folder.
$ mkdir ~/public_beta
Next give the folder and contents permissions of 755 so Apache can read the contents.
$ chmod -R 755 public_beta
Change the permissions of $HOME
Also make sure you home directory has permissions set to 711 so Apache can access your home directory, replace user_name with your login username.
$ cd /home
$ chmod 711 user_name

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/44548

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX