Creating Drupal Multisite with Subdirectory from different Domain

混江龙づ霸主 提交于 2019-12-25 04:29:15

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/28567167/creating-drupal-multisite-with-subdirectory-from-different-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!