Drupal 8: Multi-sites in subdirectories not working I followed this tutorial(Drupal 7) but it not worked for me(Drupal 8):


Multi-site in subdirectories
https://www.drupal.org/docs/7/multisite-drupal/multi-site-in-subdirectories


This is my enviroment:


CentOs 7 with SELinux(mode: enforcing)
Varnish 4.0.3
Apache 2.4.23
Drupal 8.2.4


I need to create the next structure of sites:


/          &lt;-- First site
/site2     &lt;-- Second site
/site3     &lt;-- Third site


In the file sites/sites.php i have:

$sites['localhost.site2'] = 'site2';
$sites['localhost.site3'] = 'site3';


In the directory sites/ i have:


default/
site2.localhost
site3.localhost


In the root of the drupal o have the next symlinks to .:


site2 -> .
site3 -> .


In my .htaccess file i have:

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} ^/site2/(.*)$
  RewriteRule ^(.*)$ /site2/index.php [L,QSA]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} ^/site3/(.*)$
  RewriteRule ^(.*)$ /site3/index.php [L,QSA]


When i tried to access to each subsite, he shows me the default. What is wrong?
Download latest  D8 version. 
Extract and navigate into the
directory: /drupal/sites/
Create sites.php duplicating example.sites.php
Add the code to sites.php

$sites = array(
      'dogs.multisite.local' =&gt; 'dogs',
      'multisite.local.cats' =&gt; 'cats',
    );
Create two folders named 'cats' and 'dogs' on the sites folder.

/drupal/sites/dogs/
/drupal/sites/cats/

The /drupal/sites/default/ site will have default files we need to copy into each of our sites. Copy these files using the cp command in the sites directory:

cp default/default.settings.php dogs/settings.php
cp default/default.settings.php cats/settings.php    
cp default/default.services.yml dogs/services.yml
cp default/default.services.yml cats/services.yml

Setup virtualhost

hosts

 127.0.0.1  multisite.local


httpd-vhosts.conf

&lt;VirtualHost *:80&gt;
ServerAdmin webmaster@multisite.local
DocumentRoot "/opt/lampp/htdocs/drupal"
ServerName multisite.local
ServerAlias    *.multisite.local multisite.local.*
ErrorLog "logs/multisite.local-error_log"
CustomLog "logs/multisite.local-access_log" common
&lt;/VirtualHost&gt;

Once it is done, you can start the installation of your new website in a multisite context from the urls:

   http://dogs.multisite.local/
   http://multisite.local.cats/