Score:0

Page not found while accessing website content

tn flag

I set up a Drupal 9.2.1 site, which working fine until I set it up as multi-site.

  • I have the master site in the main directory for Xampp (C:\xampp\htdocs) in the master.com directory

  • I created six multi-sites in C:\xampp\htdocs\master.com\sites with the following sub-directories: site1.com, site2.com, site3.com, site4.com, site5.com, site6.com

  • I updated the the C:\Windows\System32\drivers\etc file

    127.0.0.1  localhost
    127.0.0.1  master.com
    127.0.0.1  site1.com
    127.0.0.1  site2.com
    127.0.0.1  site3.com
    127.0.0.1  site4.com
    127.0.0.1  site5.com
    127.0.0.1  site6.com 
    
  • I updated the C:\xampp\apache\conf\extra\httpd-vhosts.conf file

    <VirtualHost *:80>
      ServerName master.com
      DocumentRoot "C:/xampp/htdocs"
    </VirtualHost>
    
    <VirtualHost *:80>
      ServerName site1.com
      DocumentRoot "C:/xampp/htdocs/master.com"
    </VirtualHost>
    
    <VirtualHost *:80>
      ServerName site2.com
      DocumentRoot "C:/xampp/htdocs/master.com"
    </VirtualHost>
    
    <VirtualHost *:80>
      ServerName site3.com
      DocumentRoot "C:/xampp/htdocs/master.com"
    </VirtualHost>
    
    <VirtualHost *:80>
      ServerName site4.com
      DocumentRoot "C:/xampp/htdocs/master.com"
    </VirtualHost>
    
    <VirtualHost *:80>
      ServerName site5.com
      DocumentRoot "C:/xampp/htdocs/master.com"
    </VirtualHost>
    
    <VirtualHost *:80>
      ServerName site6.com
      DocumentRoot "C:/xampp/htdocs/master.com"
    </VirtualHost>
    
  • I updated the C:\xampp\htdocs\SpeakFreely.com\sites\sites.php file

    $sites['site1.com'] = 'site1.com';
    $sites['site2.com'] ='site2.com';
    $sites['site3.com'] ='site3.com';
    $sites['site4.com'] ='site4.com';
    $sites['site5.com']='site5.com';
    $sites['site6.com'] ='site6.com';
    

I cannot access the site content; I always get a 404 error. The other six sites work fine.

website hierarchy: enter image description here

arpitr avatar
in flag
Can you check that 1. master.com is pointing to drupal webroot, from <VirtualHost *:80> ServerName master.com DocumentRoot "C:/xampp/htdocs" </VirtualHost> it appears the master.com is not pointing to drupal webroot. Secondly do you have default site folder along with site1.com, site2.com since you do not have master.com folder for master I assume master.com should be pointing to default site.
NaseemMahasneh avatar
tn flag
@arpitr yes I have the default directory along with site1.com,site2.com.I updated the question with the site hierarchy. how I make the master point to Webroot in this case ?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.