我正在尝试使用Linux和Apache将现有的Drupal6站点从IIS服务器迁移到AWS实例和数据库。
我一直在遵循这篇文章的说明:
http://www.imamuseum.org/cc-mcn09.pdf
我跳过了这篇文章的“配置MySQL”部分,因为我目前使用的数据库是一个MySQL DB。
到目前为止我已经..。已将源代码传输到/ebsvol/apache/www目录。
修改了"Database URL format:“下的/ebsvol/www/sites/default/settings.php文件,以匹配新的Ec2实例数据库信息。
已更改/etc/httpd/conf/httpd.conf文件以包含以下虚拟主机:
<VirtualHost 00.00.00.003:80>
#ServerAdmin root
DocumentRoot /ebsvol/apache/www
#ServerName my.test.site.edu
#ServerAlias www.my.test.site.edu
ErrorLog /ebsvol/apache/log/error.log
TransferLog /ebsvol/apache/log/access.log
<Directory /ebsvol/apache/www>
AllowOverride All
</Directory>
</VirtualHost>现在,当我打开Ec2实例Public DNS时,页面显示此错误消息,这是我的Drupal源代码中的index.php文件:
<?php
// $Id: index.php,v 1.94 2007/12/26 08:46:48 dries Exp $
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* The routines here dispatch control to the appropriate handler, which then
* prints the appropriate page.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$return = menu_execute_active_handler();
// Menu status constants are integers; page content is a string.
if (is_int($return)) {
switch ($return) {
case MENU_NOT_FOUND:
drupal_not_found();
break;
case MENU_ACCESS_DENIED:
drupal_access_denied();
break;
case MENU_SITE_OFFLINE:
drupal_site_offline();
break;
}
}
elseif (isset($return)) {
// Print any value (including an empty string) except NULL or undefined:
print theme('page', $return);
}
drupal_page_footer();有人知道为什么Drupal站点只读取index.php文件而不读取整个源代码吗?
如果您需要更多信息,请告诉我。
谢谢,
发布于 2014-05-13 01:42:23
如果它真的输出PHP源代码,这意味着您还没有配置Apache来通过PHP解析脚本。您链接到的PDF没有说明如何执行此操作。如果你使用的是fedora,它类似于下面的代码,尽管包名可能有一点不同。
sudo yum install php php-mysqlhttps://stackoverflow.com/questions/23612487
复制相似问题