0

I have two domains and one sub-domain on a single virtual host (web hosting company). I have ssh access and can create symbolic links. My question is:

Would it be just a matter of me creating a symbolic link and copying files to a virtual host path and (if so) which files would need to be copied to the directory to make this work?

For example: 3 domains

  • example.com
  • example2.com
  • demo.example.com

Drupal is currently installed on example.com. In the /sites directory there would be 4 directories:

  • all
  • example.com
  • example2.com
  • demo.example.com

Example2.com and demo.example.com are symbolic links to their ACTUAL paths on the system. Copying files to these directories such as settings.php and install.php, etc.

4

1 回答 1

1

典型的 drupal 安装旨在使用相同的代码库托管多个域,因此在您的托管服务提供商中,您可以将所有三个域指向同一个目录,该目录将是 drupal 安装的根目录,而不是 drupal 的站点目录。

如果您的 drupal 文件在 example.com 中,那么您可以创建一个符号链接,将 exmaple2.com 文件夹指向 example.com 的域目录。然后在您的 example.com 目录中,转到 sites 文件夹并创建一个 example2.com 文件夹,其中包含一个 settings.php 文件的副本,该文件将指向用于 example2 的数据库。example2 网站的文件应存储在 example.com/sites/example2.com/files 中。当您访问 example2.com/install.php 时,它应该有助于将新的 drupal 站点安装到 example.com/sites/example2.com/settings.php 所示的单独数据库中。

于 2013-04-20T17:02:10.317 回答