我试图在我的服务器中的子域上安装CakePHP应用程序。我想进行高级安装,并从webroot目录中分离出核心和应用程序库。CakePHP:试图在子域中安装应用程序
我把整个项目放在主目录的一个文件夹中,并将webroot目录的内容移动到子域的httpdocs目录。
然后,它看起来像:
子域-的httpdocs:
drwxrwxrwx 2 root root 4096 Mar 21 08:34 css
-rwxrwxrwx 1 root root 2760 Mar 21 08:34 css.php
-rwxrwxrwx 1 root root 374 Mar 21 08:34 favicon.ico
drwxrwxrwx 2 root root 4096 Mar 21 08:34 files
drwxrwxrwx 2 root root 4096 Mar 21 08:34 img
-rwxrwxrwx 1 root root 2731 Mar 21 08:43 index.php
drwxrwxrwx 2 root root 4096 Mar 21 08:34 js
-rwxrwxrwx 1 root root 3086 Mar 21 08:34 test.php
我编辑的index.php文件,并改变root和APPDIR常数点饼保持器和应用程序文件夹(在主目录) , 分别。最后,我修改了.htaccess文件(3个文件),添加了指向app目录的RewriteBase参数(就像烹饪书上说的http://book.cakephp.org/view/917/Apache-and-mod_rewrite-and-htaccess)。
我检查mod_rewrite是加载在Apache和AllowOverride所有活动,但它不起作用。它每次都响应HTTP 500。
如果我把整个项目放在httpdocs目录下(包括webroot目录下),它可以很好地工作。
你能帮我吗?
UPDATE
我检查了一遍,它的工作原理,如果所有的目录都于httpdocs文件夹(核心和应用程序目录)。但是,他们不在另一个地方工作。
它返回提前
Warning: include(cake/bootstrap.php) [function.include]: failed to open stream: No such file or directory in /var/www/vhosts/mydomain.com/subdomains/subscribers/httpdocs/apptest/webroot/index.php on line 83
Warning: include(cake/bootstrap.php) [function.include]: failed to open stream: No such file or directory in /var/www/vhosts/mydomain.com/subdomains/subscribers/httpdocs/apptest/webroot/index.php on line 83
Warning: include() [function.include]: Failed opening 'cake/bootstrap.php' for inclusion (include_path='/home/systemtest:/home/systemtest/app/:.:') in /var/www/vhosts/mydomain.com/subdomains/subscribers/httpdocs/apptest/webroot/index.php on line 83
感谢
网络服务器是否有权限访问蛋糕和应用程序文件? – 2011-03-21 20:50:28
谢谢你的回答艾米。可能它没有权限。我如何添加网络服务器的权限? httpd.conf文件? – 2011-03-21 22:56:22