简体   繁体   English

Drupal多站点-子目录,共享主机

[英]Drupal Multisite - Subdirectory, Shared Hosting

I'm trying to set up Drupal 6 multisite in a shared hosting environment. 我正在尝试在共享托管环境中设置Drupal 6多站点。 The main site's location looks like http://www.mysite.com/foo/bar/ and my goal is to create another site using the same database at http://www.mysite.com/foo/bar/drupal2 . 主站点的位置类似于http://www.mysite.com/foo/bar/ ,我的目标是使用位于http://www.mysite.com/foo/bar/drupal2的相同数据库创建另一个站点。

I've created a new folder in the sites directory called www.mysite.com.foo.bar.drupal2 and added the default.settings.php and settings.php files, configured correctly for the environment, and I've set up a symlink from the main site's root to the subdirectory, with this command: 我在sites目录中创建了一个名为www.mysite.com.foo.bar.drupal2的新文件夹,并添加了default.settings.php和settings.php文件(已针对环境正确配置),并且设置了使用以下命令从主站点的根目录到子目录的符号链接:

ln -s . drupal2

The problem is that when I go to http://www.mysite.com/foo/bar/drupal2 , I just get the main site at http://www.mysite.com without triggering the installer. 问题在于,当我访问http://www.mysite.com/foo/bar/drupal2时 ,我只是获得了http://www.mysite.com上的主站点,而没有触发安装程序。

What do I need to change to get the multisite working? 为了使多站点正常工作,我需要更改什么?

There's a whole section on Multu-site how-tos on drupal.org. 在drupal.org上有一个关于Multu网站操作方法的完整部分。

The reason what you did is not working is that you symlinked the entire site, so there wont be a difference, you'll get the same settings.php file with the same db settings etc. 之所以无法正常工作,是因为您链接了整个站点,因此不会有任何区别,您将获得具有相同数据库设置的相同settings.php文件等。

The magic happens in the sites folder, take a look at this handbook page , it looks like this is what you are after. magic事情发生在sites文件夹中,请看此手册页 ,看起来这就是您所追求的。

可能需要在“ ... / drupal2”安装中的settings.php中将$base_url设置为http://www.mysite.com/foo/bar/drupal2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM