Zend Framework 500内部服务器错误

时间:2013-06-29 16:57:29

标签: .htaccess zend-framework

昨天我在transip上买了一台VPS并安装了CentOS和DirectAdmin,我还在那里买了一个域名。 我尝试使用简单的.html和.php文件测试网站一切正常。 现在我上传了Zend,但是当我加载网站时,我获得了500内部。 结构是这样的:

  • htpasswd的
  • 应用
  • 文档
  • 文库
  • public_ftp
  • 的public_html
  • 测试

这是我的index.php:

<?php

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library/Zend'),
    get_include_path(),
)));

/** Zend_Application */
require_once '/Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
            ->run();

这是我的.htacces:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

希望有人可以帮助我。

1 个答案:

答案 0 :(得分:0)

您的Apache配置存在很大的变化问题。

确保没有注释掉重写模块:

LoadModule rewrite_module modules/mod_rewrite.so
相关问题