網站往服務器遷移後遇到了一些問題,這裡匯總一下: 1,無響應無提示,返回空白頁面 2,有內容,但是錯亂,有很多丟失,而且沒有CSS樣式 1,環境是 nginx服務器 經過幾番查找,發現問題的原因是:cache memory 不夠,導致 expired了 解決辦法:配置php5-fpm ,將默認的 32M 改為 64M(以後的話可能還不夠) 2,有內容,我們就去看看Source Code @import url("/drupal_fllcc/sites/all/themes/fllcc_zen/css/blocks.css?mjwbae"); @import url("/drupal_fllcc/sites/all/themes/fllcc_zen/css/navigation.css?mjwbae"); @import url("/drupal_fllcc/sites/all/themes/fllcc_zen/css/views-styles.css?mjwbae"); @import url("/drupal_fllcc/sites/all/themes/fllcc_zen/css/nodes.css?mjwbae"); @import url("/drupal_fllcc/sites/all/themes/fllcc_zen/css/comments.css?mjwbae"); @import url("/drupal_fllcc/sites/all/themes/fllcc_zen/css/forms.css?mjwbae" 原來是我們的路徑都定義的 /drupal_fllcc/sites 而我們把網站的域名綁到了 /sites 那一級了 解決這個問題很簡單 找到 /drupal/sites/all/default/settings.php (對了,當時要修改Mysql鏈接密碼的話也是在這個文件裡面) [php] $databases = array ( 'default' => array ( 'default' => array ( 'database' => 'drupal_fllcc', 'username' => 'root', 'password' => '123456', 'host' => 'localhost', 'port' => '', 'driver' => 'mysql', 'prefix' => '', ), ), ); 言歸正轉…… [php] * Base URL (optional). * * If Drupal is generating incorrect URLs on your site, which could * be in HTML headers (links to CSS and JS files) or visible links on pages * (such as in menus), uncomment the Base URL statement below (remove the * leading hash sign) and fill in the absolute URL to your Drupal installation. * * You might also want to force users to use a given domain. * See the .htaccess file for more information. * * Examples: * $base_url = 'http://www.example.com'; * $base_url = 'http://www.example.com:8888'; * $base_url = 'http://www.example.com/drupal'; * $base_url = 'https://www.example.com:8888/drupal'; * * It is not allowed to have a trailing slash; Drupal will add it * for you. */ //$base_url = 'http://localhost/drupal_fllcc'; $base_url = ''; 記得不能在URL的最後加 / [php] Drupal will add it for you.