In order to make multiple site work in different domains we will have to set up the software. Apache web server shall be configured by a hosting company; the same is true for multiple site in one domain.

Let us take a two site configuration as an example:

www.site1.com - company’s corporate site

www.site2.com - company’s e-store

Setup of Multiple Site in Different Domains

Each website should be located in the relevant catalog, e.g.:

/home/www/site1/

/home/www/site2/

Installing Software and Setup of Symbolic Links

The software is set in one of the sites. To make the kernel work for both sites you have to create symbolic links for the site where the kernel is not installed. The links will be required for the folders /bitrix and /upload.

Note:

It is possible to simply copy the said folders from the first site to the second. Such copying will result in two copies of the kernel working with the same database. This option will work, but it has two disadvantages: technical and legal. The technical problem is that after updating one of the kernels the database will be updated, and the second website will fail. The legal problem is that kernel copying contradicts the product license.

Note:

Copying of the said folders to an external folder to which symbolic links are configured for all websites is technically possible (but not recommended).

Symbolic Link:

A special file for which no information is stored in the file system except one text line. This line is interpreted as a path to the file which must be opened upon an attempt to access such link.

In practice, symbolic links are used for the more convenient organization of the file structure on the computer because they make it possible for one file or catalog to have several names and are free from certain limits common for hard links (which operate only within one section and cannot refer to catalogs).

There are to options to set the links. The first option is a classic option recommended by the company from the very beginning. The second option is a later addition and is considered more "beautiful and sophisticated". It omits the step of the creation of a separate folder and transfer of the system kernel into it.

First option (examples of installation on UNIX systems are marked in green):

Install "Bitrix Site Manager" first to the catalog of the first site /home/www/site1/

Create the catalog /home/www/shared/ where the files that are common for all the websites will be located:
mkdir /home/www/shared

Run the script and indicate the path to the root folder of the first website, in our case /home/www/site1/.

Once symbolic links are created, type in the browser’s address bar site1/bitrix/admin. The authorization panel opens.

Type the administrator’s data indicated when installing the product to the first website, and you will be redirected to the administrative panel of Bitrix Site Manager.

When script operation is completed, the symbolic links to the folders /bitrix and /upload n the folder of the second website become available. Their availability can be easily verified because the folders with the same names appear.

The following problems may arise at the creation stage:

Absence of rights to write in the current folder;

Security restriction (open_basedir) which prohibits users of a shared hosting from addressing other websites.

Contact your host should any problems arise with this script.

Website Configuration

Website are configured in the administrative section of the system on the page Control Panel > Settings > System settings > Websites > Websites.

Let us set up the first site (www.site1.com):

Name: site1

Domain: www.site1.com

Site folder: /

Website name: Corporate Website of "Company Name"

Server URL: www.site1.com

Path to the web server root folder of this site: /home/www/site1/

If DNS is configured so that your website responds to the address http://site1.com, it is better to omit www in the field Domain. You can enumerate any number of domain names you wish your website to respond to (or which your website already responds) using a new line in this field.

It is important to keep in mind that the product uses the values indicated in the field Domain to submit to the indicated domains the information about visitors using the technique of transfer of visitors. That is why it is strongly recommended that a complete list of domains which the website can respond to should be indicated.

It is very important not to indicate websites which do not work on this product copy in the list of domains. Incorrectly indicated or inexistent domain may slow down users’ experience as well as actually prevent transferring data to the websites not working on the shared product copy.

Set up the parameters of the second website following the same pattern (www.site2.com/):

Name: site2

Name: site2.com

Site folder: /

Website name: E-Store of "Company Name"

Server URL: www.site2.com

Path to the web server root folder of this site: /home/www/site2/

Please note that the same value "/" is indicated in the parameter Site folder for both websites. This is because the sites are serviced by different "virtual servers" (using Apache terms) which have different catalogs for the layout of files.

Also pay attention to the parameter Path to the web server root folder of this site. It has a different value for different websites taken from the parameter DocumentRoot of settings of the relevant "virtual server" (see an example of a part of the file httpd.conf of the Apache settings below).

Note:

When it comes to organizing multisiting using this option, you can use both virtual servers of one Apache unit and different Apache units. This is also true for other web servers: IIS, EServ, etc.

Important: When creating the second website you have to copy from the main website or create anew the files /.htaccess and /404.php.

File .access.php

Create the file .access.php with the following contents in the root of the second website:

<? $PERM["/"]["*"]="R"; ?>

Note:

Unlike Pseudomultisiting, for this option of multisiting setting website selection algorithm on the index page is not required because the website will be unambiguously defined according to the Domain field.

Logging In

Enter administrator’s data which you have indicated when installing product on the first site, and then you will access the administrative panel of Bitrix Site Manager

Since the kernel and the base are the same, the administrative panel for both websites will be the same.

Technically, the system permits creating any number of websites working pursuant to this principle. For each new website, a web server must be set up and a symbolic link must be created. Legally, an additional coupon must be acquired in order to create each new website (except for the first two websites).

Note:HTML cache is not supported with multisiting organized according to the second option.