我正在尝试在新的MacBook Air 13”上设置本地环境:内置的Apache,带有我自己的DocumentRoot
PHP和MySQL。通常,我/etc/hosts
只是为了以一个固定的链接运行本地网站而进行更新:local/example
。作为参考,我通常校验:
这一次,我只是得到一个403禁止每次我打的时间错误127.0.0.1
,localhost
或local
。首先,我在终端上看到Apache和PHP都在运行(即使我无法查看PHP页面)。然后我根据Apache权限更新了所有权限 ; 现在我只是绝望了。以下是相关的Apache配置:
/etc/hosts
(查看文件 -添加了一行)/etc/apache2/httpd.conf
(查看文件 -更新了DocumentRoot
)/etc/apache2/users/joao.conf
(查看文件 -创建此文件)/etc/apache2/extra/httpd-vhosts.conf
(查看文件 -已更新VirtualHost
)
看来Apache在某种程度上拒绝了我的访问权限DocumentRoot
(顺便说一句~/Sites
)。由于~/Sites
实际上是一个符号链接,因此我尝试DocumentRoot
使用以下路径进行更新(所有路径均指向同一目录):
~/Sites
/Users/joao/Sites
/Users/joao/Dropbox/Workflow/Sites
(原始目录)
仍然抛出403。任何想法如何解决/调试?
快速更新 -这是我的/var/log/apache2/joao.pt-error_log
样子:
[Sun Jul 07 12:50:45 2013] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
[Sun Jul 07 12:50:45 2013] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied
[Sun Jul 07 12:50:45 2013] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied
[Sun Jul 07 12:50:45 2013] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied
[Sun Jul 07 12:50:47 2013] [error] [client ::1] (13)Permission denied: access to / denied
[Sun Jul 07 12:50:47 2013] [error] [client ::1] (13)Permission denied: access to / denied
[Sun Jul 07 12:50:48 2013] [error] [client ::1] (13)Permission denied: access to /favicon.ico denied
[Sun Jul 07 12:50:48 2013] [error] [client ::1] (13)Permission denied: access to /favicon.ico denied
/Sites
(在我的根/
文件夹中),并将文件放在此处,并相应地配置Alias和Directory选项。很好