I have two existing live sites running drupal 7 (site1.com/en and site2.com/en --> /en for language english) and want to unite them using subdirectory urls (site1.com/en/site2) with seperate databases. I first tried to follow on my computer (Windows 7) the documentation for installing multisites since I am still a beginner in Drupal.

1. I created a new database db1, run the script of site1 backup and db2 for site2.

2. I went on C:\xampp\htdocs\site1\en\sites copied default folder and created a new one with the name of the subsite. Names I tried: \port.localhost.site1.en.site2, \localhost.site1.site2, \site1.com.en.site2, \site1.site2 \site2.

3. Contents of subsite folder:
- default.settings.php & setting.php. Unchecked read only property. Used copy from site2\en\sites containing db2 information. base url was not specified in the original file so I didn't make any changes. Although I tried using
$base_url = 'http://localhost:port/site1/en/site2';
- Copied from site2\en\sites the \files folder
- Created empty folders modules, themes & tmp. Also tried to copy modules & themes from sites2\en.

4. Open Windows host file & added:
127.0.0.1 site1
127.0.0.1 site2

5. Uncommented in C:\xampp\apache\conf\httpd.conf line Include conf/extra/httpd-vhosts.conf.

6. Added in conf\extra\httpd-vhosts.conf lines


DocumentRoot C:/xampp/htdocs/site1/en
ServerName site1


DocumentRoot C:/xampp/htdocs/site1/en
ServerName site2

7. Restarted Apache & tried http://localhost:port/site1/en/site2 directly because drupal in already installed in site2. Also tried http://localhost:port/site1/en/site2/install.php removing files from site2 folder to make a fresh installation and copy files later. install.php is in site1\en folder

Every time I got 404 page not found. I am sure I didn't get something right. Thanks for the help! :)

Comments

wusel’s picture

You can look at Multi-site on XAMPP for Windows (https://www.drupal.org/node/1682040).

Good luck!

Wusel