Ken J
Ken J

Reputation: 4562

Drupal 7 multi-site install

I have two domains and one sub-domain on a single virtual host (web hosting company). I have ssh access and can create symbolic links. My question is:

Would it be just a matter of me creating a symbolic link and copying files to a virtual host path and (if so) which files would need to be copied to the directory to make this work?

For example: 3 domains

Drupal is currently installed on example.com. In the /sites directory there would be 4 directories:

Example2.com and demo.example.com are symbolic links to their ACTUAL paths on the system. Copying files to these directories such as settings.php and install.php, etc.

Upvotes: 0

Views: 619

Answers (1)

Dave
Dave

Reputation: 385

A typical drupal install is designed to host multiple domains using the same code base, so in your hosting provider you could point all three domains to the same directory which would be the root of the drupal install and NOT the sites directory of drupal.

If your drupal file is in example.com then you could create a symbolic link to point to the exmaple2.com folder to example.com's domain directory. Then in within your example.com directory go to the sites folder and create an example2.com folder with a copy of a settings.php file that will point to the database used for example2. Files for the example2 web sites should be stored in example.com/sites/example2.com/files. When you visit example2.com/install.php, it should facilitate the install of the new drupal site into a separate database indicated in example.com/sites/example2.com/settings.php.

Upvotes: 1

Related Questions