问题描述
我正在尝试创建Drupal Multisite。目前,我们可以使用以下表单 abc.example.com
def。 example.com
xyz.example.com
所有网站都在目录中的相同服务器(Nginx Server)
/var/www/vhosts/abc.example.com/httpdocs
/var/www/vhosts/def.example.com/httpdocs
/var/www/vhosts/xyz.example.com/httpdocs
现在我们必须为每个实时网站创建博客,我们正在研究Drupal Mutlisite Architecture,因此所有站点都应该指向相同的代码库,这将减轻我们的维护任务。
我们目前已经创建了符号链接到主/默认域网站目录,该目录安装在blogs.example.com,因此符号链接创建为
ln -s /var/www/vhosts/blogs.example.com/httpdocs/ /var/www/vhosts/xyz.example.com/httpdocs/blog
在网站下创建一个文件夹作为 sites / xyz.example.com.blog
但是当我们在浏览器中打开URL时,我们得到没有输入文件指定
我们不知道上述错误是否是由于某些问题。 htaccess,我们也是混淆在哪里添加与MutliSite相关的无关配置。
任何帮助将不胜感激。
正如您的符号链接应位于 xyz.example.com 和 blogs.example.com 是一样的,而 xyz.example.com 在您的虚拟主机上设置为 ServerAlias 到 blogs.example.com 。所以,当您的浏览器点击 http://xyz.example.com/blog 时,您应该得到您的网站。
当您以管理员身份登录新站点后,请检查或将以下管理菜单中的公用文件系统路径的正确路径移至 sites / xyz.example.com.blog /文件:
首页»管理»配置»媒体»文件系统
I'm attempting to create Drupal Multisite. Currently lets say we have below Live Sites in the form
abc.example.com
def.example.com
xyz.example.com
All the Sites are present on the Same server (Nginx Server) in the directories
/var/www/vhosts/abc.example.com/httpdocs
/var/www/vhosts/def.example.com/httpdocs
/var/www/vhosts/xyz.example.com/httpdocs
Now we have to create Blogs for each Live Site, we are looking into Drupal Mutlisite Architecture for the same, so all Sites should point to same codebase, which would ease our maintenance tasks.
We have currently created symlinks for to main/default domain Site directory which is installed at blogs.example.com so symlink is created as
ln -s /var/www/vhosts/blogs.example.com/httpdocs/ /var/www/vhosts/xyz.example.com/httpdocs/blog
And created a folder under sites as sites/xyz.example.com.blog
But when we open the URL in browser we get "No input file Specified"
We are not sure if the above error is due to some issue in .htaccess, also we are consfused where to add htacess configuration related to MutliSite.
Any help would be appreciated.
As explained here your symbolic link shall be under /var/www/vhosts/blogs.example.com/httpdocs as the installed directory as well as the created sites folder. Try also to remove the end slash on httpdocs/ on your symbolic link:
ln -s /var/www/vhosts/blogs.example.com/httpdocs/ /var/www/vhosts/xyz.example.com/httpdocs/blog
to httpdocs only, like so:
ln -s /var/www/vhosts/blogs.example.com/httpdocs blog
or do it in 2 lines command:
cd /var/www/vhosts/blogs.example.com/httpdocs ln -s . blog
Make sure also that CNAME of both xyz.example.com and blogs.example.com are the same and that the xyz.example.com is set as ServerAlias to blogs.example.com on your vhost. So you should get your site when point your browser to http://xyz.example.com/blog.
Once you have login to your new site as the admin, check or put the correct path for Public file system path under the following admin menu to sites/xyz.example.com.blog/files:
Home » Administration » Configuration » Media » File System
这篇关于从不同的域创建具有子目录的Drupal多站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!