我正在尝试使用Linux和Apache将现有的Drupal 6站点从IIS服务器迁移到AWS实例和数据库。
我一直在遵循本文的说明:
http://www.imamuseum.org/cc-mcn09.pdf
我已跳过本文的“配置MySQL”部分,因为我目前在AWS上使用的数据库是MySQL数据库。
到目前为止,我有...... 将源代码传输到/ ebsvol / apache / www目录。
更改了“数据库URL格式:”下的/ebsvol/apache/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实例公共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文件而不是整个源代码?
如果您需要更多信息,请与我们联系。
谢谢,
答案 0 :(得分:0)
如果它真正输出PHP源代码,则意味着您还没有配置Apache来通过PHP解析脚本。您链接的PDF不会说明如何操作。如果您使用的是fedora,它的内容类似于以下内容,尽管软件包名称可能略有不同。
sudo yum install php php-mysql