【发布时间】:2012-10-01 22:20:21
【问题描述】:
所以我逐字下载了最新版本的 CakePHP 并将其解压缩到目录/var/www/cake_2/(Ubuntu 上的 Apache2)。当我尝试访问localhost/cake/ 时,出现以下错误:
You don't have permission to access /cake/ on this server.
我已添加:
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
到我的/etc/apache2/apache2.conf 文件并将/var/www/cake/ 中.htaccess 的内容更改为:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
我仍然遇到同样的错误。谁能提供一些指导?
【问题讨论】:
-
听起来像是权限错误。确保 apache 可以读取
/cake目录(检查 apache conf 中的用户:它正在使用的组)。
标签: apache cakephp cakephp-2.2