【问题标题】:Drupal multi-site setup with sub-directories带有子目录的 Drupal 多站点设置
【发布时间】:2011-01-21 20:45:18
【问题描述】:

我有一个带有单个代码库的多站点设置。 是否可以像这样使用子文件夹设置我的站点目录: mysite.com 在 /home/drupal/sites/mysite.com

/home/drupal/sites/cluster1/othersite1.com 中的 othersite1.com

/home/drupal/sites/cluster1/othersite2.com 中的 othersite2.com

/home/drupal/sites/cluster2/othersite3.com 中的 othersite3.com

/home/drupal/sites/cluster2/othersite4.com 中的 othersite4.com

我正在尝试找到一种方法来组织我的所有网站。

谢谢

【问题讨论】:

    标签: drupal subdirectory single-instance


    【解决方案1】:

    如果您使用 Drupal 7,您可以这样做。在站点文件夹中有一个名为 sites.php 的文件,您可以为站点的路径设置别名。如果您使用的是

     ln -s /home/drupal/sites/cluster1/othersite1.com othersite1.com 
    

    在 settings.php 中解释了 Drupal 查找站点文件夹的方式,请阅读。

    【讨论】:

    • 谢谢迈克尔,我现在就试试。在运行该命令之前,我是否需要 cd 进入某个目录?我的 Drupal 安装在 /home/drupal 。
    • 谁能告诉我我必须 cd 到哪里才能运行这个命令?另外要明确的是,我不希望目录 cluster1、cluster2... 成为站点本身。
    • 目录不是站点,只有链接的才是站点。您应该在 /sites 中链接 site.com -> 您的路径。因此,在 /sites 中运行该命令。所以 ln -s /absolute/path/to/your/site yoursite.com in /sites
    猜你喜欢
    • 2019-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-14
    • 1970-01-01
    • 2018-01-13
    相关资源
    最近更新 更多