我試圖在我的服務器中的子域上安裝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