Drupal多站点设置 [英] Drupal multisite setup

查看:153
本文介绍了Drupal多站点设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将drupal设置为托管多个不会互相影响的站点。我的页面托管在共享托管服务上,我只能访问cPanel。
按照我在Google上发现的网络说明进行以下操作。

I am trying to setup drupal to host multiple sites which will not effect each other. My pages are hosted on a shared hosting service and I only have access to cPanel. Following the instructions on the web that I found using google, I have done the following.


  1. 已安装Drupal。

  2. 在站点中创建一个目录,并将其命名为demo.sharedhost.com。

  3. 在该目录中复制default.settings.php,并将其重命名为settings.php。 / li>
  4. 创建了子域演示。

  5. 从public_html
  6. 中删除了演示文件夹
  7. 将符号链接public_html / demo制作为网站/demo.myshost.com。

  1. Installed Drupal.
  2. Make a directory in sites and name it demo.sharedhost.com.
  3. Copied default.settings.php in that directory and renamed it settings.php.
  4. Created a subdomain demo.
  5. Deleted the demo folder from public_html
  6. Made sybolic link public_html/demo to sites/demo.myshost.com.

当我尝试访问demo.myhost.com时,我会获得网站/demo.myhost的列表。 .com目录而不是drupal安装。

When I try to access demo.myhost.com I get listing of sites/demo.myhost.com directory instead of drupal installation.

您能帮我设置多站点吗?

Can you please help me setup multisites?

谢谢。

推荐答案

最后我找到了答案。在第六步中,我建立了一个指向drupal_installation / sites / demo.myhost.com的符号链接,这些说明在互联网上是错误的。 sybolic链接应针对drupal_installation路径。

Finally I found the answer. In 6th step I made a symbolic link to drupal_installation/sites/demo.myhost.com, these instructions are wrong on the internet. The sybolic link should be targeted to drupal_installation path.

所以这是我的最后步骤:

So here is my final steps:


  1. 〜/ public_html / drupal_path 中安装Drupal。

  2. 〜/ public_html / drupal_path / sites 中创建目录将其命名为 demo.myhost.com

  3. 〜/ public_html / drupal_path / sites中复制 default.settings.php /demo.myhost.com 目录,并将其重命名为 settings.php

  4. 创建了一个子域demo.myhost.com。

  5. 从自动创建的public_html中删除演示文件夹。

  6. 按如下所示进行符号链接:
    ln -s〜/ public_html / drupal_path〜/ public_html / demo
    注意:如果您无权访问shell,请使用以下php脚本进行符号链接:

  1. Installed Drupal in ~/public_html/drupal_path.
  2. Make a directory in ~/public_html/drupal_path/sites and name it demo.myhost.com.
  3. Copied default.settings.php in ~/public_html/drupal_path/sites/demo.myhost.com directory and renamed it settings.php.
  4. Created a subdomain demo.myhost.com.
  5. Deleted the demo folder from public_html, which was created automatically.
  6. Made sybolic link as follow: ln -s ~/public_html/drupal_path ~/public_html/demo Note: If you do not have access to shell then use the following php script to make the symlink:

<?php
      exec("ln -s ~/public_html/drupal_path/ ~/public_html/demo"); 
?>


  • 最后通过 http://demo.myhost.com ,系统将提示您安装新的drupal。

  • Finally visit the demo site by http://demo.myhost.com and you will be prompted for new drupal installation.

    我再次说明了这些步骤,因此像我这样的人将不必浪费时间阅读不同的解决方案

    I am explaining the steps again so someone like me will not have to waste time reading different solutions posted on the internet.

    请让我知道是否不清楚。

    Please let me know if something is not clear.

    这篇关于Drupal多站点设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆