本文介绍了同一目录中有多个站点,但数据库不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我与HostGator的基于Linux的共享托管帐户中,很快它将有十二个站点。我的帐户中CPanel备份有文件数限制。

In my Linux based shared hosting account with HostGator, it is soon going to be dozen of sites. There is files count limitation for CPanel backups in my account.

为减少文件总数,我需要大家的建议,以便我继续添加新的站点使用Drupal-6。

To reduce the total number of files I need suggestion from you all so that I continue to add new bunch of sites using Drupal-6.

我不想共享同一数据库只是为了简化维护。我知道Drupal允许在同一数据库中有多个站点。

I don't want to share the same database just to keep my maintenance simple. I know Drupal allows multiple sites in the same DB. But I want to avoid it.

我可以在旧站点中重复使用相同的Drupal文件,并使用它们在新站点中创建符号链接吗?

Can I reuse the same Drupal files in my old site and use them to create symbolic link from my new site? Except for root/sites directory because it may contain temporary files or files used/uploaded specific to each site.

因此,如果我的Drupal 6网站site1.com在那里那么我可以通过在site2.com中创建指向sit1.com的符号链接(除了 sites 目录之外)来将其文件重新用于新站点site2.com:

So if my Drupal 6 site site1.com is there then I can reuse its files for my new site site2.com by creating symbolic links in site2.com pointing to sit1.com except for sites directory:

site2.com/includes-> site1.com/includes

site2.com/includes->site1.com/includes

site2.com/modules-> site1.com/modules

site2.com/modules-> site1.com/modules

site2.com/sites(未共享)

site2.com/sites ( not shared)

site2.com/misc-> site1.com/misc

site2.com/misc -> site1.com/misc

....

我经历了相关主题:,但我不想按照其中的建议进行操作。

I've gone through related thread: Combining databases in Drupal but I don't want to go as per suggestions in it.

任何建议ab

推荐答案

您想要的是Drupal的多站点功能。这旨在处理单独的数据库和上载的文件,但在站点之间具有共享的代码。基本上,您将每个虚拟主机的文档根指向相同的Drupal安装,并且Drupal负责加载正确的数据库。

What you want is Drupal's multisite feature. This is intended to work separate database and uploaded files but with shared code across the sites. Basically you point the document root for each virtualhost at the same Drupal installation and Drupal takes care of loading the correct database.

此处的详细信息:

这篇关于同一目录中有多个站点,但数据库不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 06:42