2013-06-29 135 views
0

昨天我在transip上買了一個VPS並安裝了CentOS和DirectAdmin,我也在那裏買了一個域名。 我試圖用簡單的.html和.php文件測試網站的所有工作正常。 現在我上傳了Zend,但是當我加載網站時,我得到了一個500內部。 的結構是這樣的:Zend Framework 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] 

希望有人能幫助我。

+3

這可能是100級的事情之一。您需要檢查Apache錯誤日誌以查看實際錯誤。 –

+1

並檢查PHP錯誤日誌文件 – sdespont

回答

0

你的Apache配置有一個很大的變化問題。

請確保重寫模塊沒有被註釋掉:

LoadModule rewrite_module modules/mod_rewrite.so