Drupal网站下载:不能按原样安装网站 [英] Drupal Site Download : Not able to install site as-is
问题描述
在这方面的任何帮助将不胜感激。
假设这是后续的:下载后的本地主机上的Drupal站点安装来源使用FTP
如果您在访问刚刚迁移到本地主机的站点时获得Drupal安装屏幕,那么可能是因为您尝试使用与远程站点不同的URI在本地访问站点,并且此URL不在Drupal在查找settings.php文件时搜索的目录中(请参阅第20行的default.settings.php文件中的关于第20行的注释e站点/默认文件夹)。
您有两个选项:
strong>选项1:在本地主机上创建一个符号链接,将您的本地URI的请求指向托管活动网站的目录。这将是这样的:
ln -s / path / to / webroot / sites / default / / path / to / webroot / sites / mydevsite.dev
选项2:创建一个网站/ sites.php文件将URI映射到托管settings.php文件的正确文件夹。例如,如果您在sites / default文件夹中离开settings.php文件,则可以将其添加到sites / sites.php:
$ sites ['mysite.dev'] ='default';
$ sites ['www.mysite.dev'] ='default';
$ sites ['mysite.com'] ='default';
$ sites ['www.mysite.com'] ='default';
简而言之,这转换成:服务站点mysite.dev,www.mysite.dev,mysite .com和www.mysite.com从位于site / default的文件夹。
我通常使用第二个选项。它更可持续,独立于操作系统,并且可以承诺来源控制。
您需要在Drupal安装中编辑 .htaccess
文件。查找此部分:
#如果您在子目录或
#VirtualDocumentRoot中使用Drupal,请修改RewriteBase并且重写规则无法正常工作。
#例如,如果您的网站位于http://example.com/drupal uncomment,
#修改以下行:
#RewriteBase / drupal
#
#如果您的网站正在http://example.com/上的VirtualDocumentRoot中运行,则
#取消注释以下行:
#RewriteBase /
并按照说明,取消注释行并将其设置为您的子目录。
I recently downloaded a fully functional drupal(6) site using FTP. Though I installed the Drupal instance, I got the modules and the themes that were in the sites/all folder, but wasn't able to get the actual site configuration ( Configuration and Settings of those modules )
Any help in this regard would be greatly appreciated.
Assuming this is a follow-on of: Drupal Site install on localhost after downloading source using FTP
If you get the Drupal install screen when accessing a site you've just migrated to your localhost, it's likely because you're trying to access the site locally using a URI that's different than the remote site AND this URL does not fall within the directories that Drupal searches when looking for a settings.php file (see comments starting about line 20 in the default.settings.php file of the sites/default folder).
You have two options:
Option 1: Create a symbolic link on your localhost that points requests to your local URI to the directory hosting the live site. This would look something like this:
ln -s /path/to/webroot/sites/default/ /path/to/webroot/sites/mydevsite.dev
Option 2: Create a sites/sites.php file that maps URI's to the correct folder hosting your settings.php file. For example, you'd add this to sites/sites.php if you left your settings.php file in the sites/default folder:
$sites['mysite.dev'] = 'default';
$sites['www.mysite.dev'] = 'default';
$sites['mysite.com'] = 'default';
$sites['www.mysite.com'] = 'default';
Simply put, this translates into: "Serve sites mysite.dev, www.mysite.dev, mysite.com, and www.mysite.com from the folder located at sites/default."
I usually use the second option. It's more sustainable, OS independent, and can be committed to source control.
Update based first 5 comments:
You need to edit the .htaccess
file in your Drupal install. Look for this section:
# 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 /
And do as it says, uncomment out the line and set it to your subdirectory.
这篇关于Drupal网站下载:不能按原样安装网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!