Apache Drupal迁移问题

Apache Drupal迁移问题,apache,drupal,migration,Apache,Drupal,Migration,将Drupal(6.16)安装从共享主机迁移到Linode VPS(UBTO 10.04 32位)后。每当我点击一个URL,它只显示主页。我将?q=user放在URL的末尾,以管理员身份登录。当我登录时,它是相同的。我无法导航到任何URL。它只显示主页。我忘记在迁移之前清理Drupal缓存。是因为这个吗?我无法导航到“管理”>“站点配置”>“性能”以清除缓存,没有任何功能。 顺便说一下,已启用.htaccess重写,如下所示。我已将.htaccess文件迁移到新服务器。有一个类似的例子,但对我的

将Drupal(6.16)安装从共享主机迁移到Linode VPS(UBTO 10.04 32位)后。每当我点击一个URL,它只显示主页。我将?q=user放在URL的末尾,以管理员身份登录。当我登录时,它是相同的。我无法导航到任何URL。它只显示主页。我忘记在迁移之前清理Drupal缓存。是因为这个吗?我无法导航到“管理”>“站点配置”>“性能”以清除缓存,没有任何功能。 顺便说一下,已启用.htaccess重写,如下所示。我已将.htaccess文件迁移到新服务器。有一个类似的例子,但对我的情况无效

apache2 apache2文件apache2 utils libapache2-mod-php5 php5 php pear php5 xcache php5 suhosin php5 mysql 软件包已安装

我能做什么

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  # There is no end quote below, for compatibility with Apache 1.3.
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  <FilesMatch \.php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non-Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off
  </FilesMatch>
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
#
#Apache/PHP/Drupal设置:
#
#保护文件和目录免受窥探。
命令允许,拒绝
#不显示映射到目录的URL的目录列表。
选项-索引
#遵循此目录中的符号链接。
选项+FollowSymLinks
#让Drupal处理任何404错误。
ErrorDocument 404/index.php
#对不存在的favicon.ico请求强制发送简单错误消息。
#为了与Apache1.3兼容,下面没有结束语。
ErrorDocument 404“未找到请求的文件favicon.ico。
#设置默认处理程序。
DirectoryIndex.php
#覆盖PHP设置。更多信息,请访问sites/default/settings.PHP
#但在运行时无法更改以下内容。
#PHP4,Apache1。
php\u值魔法\u引号\u gpc 0
php\u值寄存器\u全局0
php_值session.auto_启动0
php_值mbstring.http_输入传递
php_值mbstring.http_输出过程
php_值mbstring.encoding_翻译0
#PHP4,Apache2。
php\u值魔法\u引号\u gpc 0
php\u值寄存器\u全局0
php_值session.auto_启动0
php_值mbstring.http_输入传递
php_值mbstring.http_输出过程
php_值mbstring.encoding_翻译0
#PHP5、Apache1和Apache2。
php\u值魔法\u引号\u gpc 0
php\u值寄存器\u全局0
php_值session.auto_启动0
php_值mbstring.http_输入传递
php_值mbstring.http_输出过程
php_值mbstring.encoding_翻译0
#需要启用mod_expires。
#启用过期。
过期于
#访问后将所有文件缓存2周(A)。
到期默认A1209600
#不允许缓存PHP脚本,除非它们显式地发送缓存
#标题本身。否则所有脚本都必须覆盖
#如果mod_设置的头需要另一个缓存行为,则会过期。这可能会导致
#如果在引导过程的早期出现错误,则失败,并可能导致
#如果在子目录中安装了非Drupal PHP文件,则会出现问题。
过期活动关闭
#各种重写规则。
重新启动发动机
#如果您的站点既可以使用“www.”前缀访问,也可以不使用“www.”前缀访问,则您可以
#可以使用以下设置之一将用户重定向到您的首选
#URL,带或不带“www.”前缀。请仅选择一个选项:
#
#要重定向所有用户以访问带有“www.”前缀的网站,
# (http://example.com/... 将被重定向到http://www.example.com/...)
#调整和取消注释以下内容:
#RewriteCond%{HTTP_HOST}^example\.com$[NC]
#重写规则^(.*)$http://www.example.com/$1[L,R=301]
#
#要重定向所有用户以访问不带“www.”前缀的站点,
# (http://www.example.com/... 将被重定向到http://example.com/...)
#取消注释并调整以下内容:
#RewriteCond%{HTTP_HOST}^www\.example\.com$[NC]
#重写规则^(.*)$http://example.com/$1[L,R=301]
#如果在子目录或子目录中使用Drupal,请修改RewriteBase
#VirtualDocumentRoot和重写规则无法正常工作。
#例如,如果您的站点位于http://example.com/drupal 取消注释和
#修改以下行:
#重写BASE/drupal
#
#如果您的站点在以下位置的VirtualDocumentRoot中运行:http://example.com/,
#取消对以下行的注释:
#重写基/
#将表单“x”的URL重写为表单“index.php?q=x”。
重写cond%{REQUEST_FILENAME}!-f
重写cond%{REQUEST_FILENAME}!-d
RewriteCond%{REQUEST_URI}!=/favicon.ico
重写规则^(.*)$index.php?q=$1[L,QSA]

您在VPS上,因此应该可以访问控制台。
只需安装并启动“drush缓存清除”“

您可以使用
?q=admin/blah
访问您的页面吗?”?我想这不是缓存问题。检查
mod_rewrite
模块是否启用。您可以将此命令作为root:
a2enmode rewrite
启用。我认为serverfault.com更适合这样做。我有多傻你说得对。我忘了启用“重写”。如果你回答我的问题,我会把它设为接受答案。谢谢你。也谢谢管理员告诉我关于德鲁什的事。不客气,德鲁什很棒;)谢谢你的提示。我安装了drush 2.0-6并应用了drush缓存清除。Cahce被清除,然后显示一些警告:试图修改第24、25、26、27、28行的[warning]public\u html/drupal/sites/all/modules/date/includes/date\u plugin\u display\u attachment.inc中非对象的属性。但是它仍然不起作用。