服务器文件根目录下的PHP文件可以';找不到必要的文件夹
我正在尝试安装craft cms,我得到以下错误服务器文件根目录下的PHP文件可以';找不到必要的文件夹,php,apache,content-management-system,digital-ocean,Php,Apache,Content Management System,Digital Ocean,我正在尝试安装craft cms,我得到以下错误 Could not find your craft/ folder. Please ensure that $craftPath is set correctly in /var/www/index.php 这就是我的index.php文件夹的外观 <?php // Path to your craft/ folder $craftPath = '../craft'; // Do not edit below this line $p
Could not find your craft/ folder. Please ensure that $craftPath is set correctly in /var/www/index.php
这就是我的index.php文件夹的外观
<?php
// Path to your craft/ folder
$craftPath = '../craft';
// Do not edit below this line
$path = rtrim($craftPath, '/').'/app/index.php';
if (!is_file($path))
{
exit('Could not find your craft/ folder. Please ensure that <strong><code>$craftPath</code></strong> is set correctly in '.__FILE__);
}
require_once $path;
craft文件夹只是www上面的一个目录,不明白为什么找不到它
这里是我的apache2.conf文件的一些部分,我认为它们会有所不同,文件很大,我不知道如何在nano中复制整个文件
Include /etc/phpmyadmin/apache.conf
DocumentRoot /var/www
ServerRoot "/etc/apache2"
尝试使用以下方法:
$craftPath = './craft';
而不是
$craftPath = '../craft';
您可能没有访问该目录的权限。尝试更改目录权限
chmod a+x ../craft
如果不起作用,只需将其移动到
www
文件夹中,并将$craftPath
设置为'craft'
我在数字海洋上使用Ubuntu并在那里使用预建的lamp安装。无骰子,文件夹位于其上方,不在同一目录中。我添加了文件目录的屏幕截图。尝试了所有组合没有工作我在重置apache时遇到此错误root@cms:/var/www#sudo service apache2 reload*重新加载web服务器配置apache2[太阳2014年2月16日04:04:23][警告]NameVirtualHost*:80没有VirtualHost我认为问题在于craft目录不在www
(执行脚本的地方),因此您没有访问权限。你试过把它移到目录里吗?我刚把它移到www目录里。它在我的ftp中,当我在ssh中查看它时。好的,只需将$craftPath
设置为'craft'
,它应该可以找到。我会尝试它,我只是再次上传文件夹,因为我第一次上传时对它进行了压缩和解压缩。