Views: 2528 (Data available since 06.02.2017)
Before setting up the system to make it work with several sites you have to create a new site. It is made in the Administrative Section on the page Websites (Control Panel > Settings > System settings > Websites > Websites). At the time of adding an entry about the new site to the site table, please indicate the following parameters:
- ID – a 2-digit combination, e.g. lt, en, de, s1, s2 etc.
- Name – an arbitrary name of the website; together with the site ID it is used in different administrative forms to indicate binding to a specific site.
- Domain – domain names which correspond to this site are indicated.
Domain names are set in a separate line (one name per line).
Each domain name is a «mask», i.e. may include subdomains. E.g., the following sites can be selected by the name site.com: www.site.com or www1.site.com, and my-site.com. In this case site.com is partially included in all three domain names.
In version 11 or later, the use of Cyrillic domain names is possible.
If the site which domain name is indicated by error provides for pop-up windows, visitors of your site will also see these pop-up windows.
For example, if for the site http://demo.bitrixsoft.com/ instead of demo.bitrixsoft.com demo.bitirxsoft.com (error in the position of the second i) is typed, the following code will be added to the page code of the site http://demo.bitrixsoft.com/:
<IMG style="width:0px; height:0px; border: 0px"
As a result, visitors of the site http://demo.bitrixsoft.com/ will be shown pop-up windows of the site with the domain name demo.bitirxsoft.com.
In order to avoid problems in case the domain names of different sites partially coincide, use site sorting index. In this case, when a site is selected by domain name the sorting index will be compared and the site with the lesser index value will be used.
If the sorting index value coincides, the verification will be made according to the length of the domain name.
- Site folder – a folder is set where information content of the site, its sections and pages are located.
The indicated value is used as a reference level to build logical and physical structure in the structure management module.
- Sorting index - a numeric parameter is indicated which determines the order of the site in the general list.
In a number of cases, when adding a second site, the templates indicated for such second site may become inapplicable. The problem is caused by a special mechanism of site selection. Thus, if the name of the second site (e.g., test.site.org) contains the name of the first site (site.org), and the sorting value of the second site is bigger than that of the first site, the templates will be applied to the second site from the first. When using such names, indicate a smaller sorting value for the second site compared with that of the first site.
In the Parameters sections, the language settings of the site are determined. Also, the following values are set:
- Website name – an arbitrary name of the website which can be used in mail templates. If the value is not set in the site parameters, the value of the same name parameter from the kernel module settings will be used.
- Server URL – the set server address will be used when forming mail messages based on the templates. The address will be indicated without http://. If the value is not set in site settings, the value of the same name from the kernel module settings will be used.
- Default Email address – an email address will be set which will be used as a macros value DEFAULT_EMAIL_FROM when forming mail messages for each server. If this field is not completed for the site, the template will use the mail address indicated in the settings of the kernel module.
- Path to the web server root folder of this site – a full path to the folder for which the variable DOCUMENT_ROOT is set up for this site shall be indicated. In order to facilitate the insertion of the full path into this filed, the link «insert current» can be used. In this case, a full path to files of the current site on the server will be automatically inserted.
This possibility of inserting the current path should be used only when you actually are on the website for which the value is being inserted.
For example, while in the administrative section, when coming from site1.com/bitrix/admin the path value exactly for this site will be inserted:
In order to set the current value for site2.com
you have to go to the administrative part of site2.com/bitrix/admin
In this case, the following path value will be inserted:
- Create Email templates – an option to create or bind mail templates; it is available only when creating a new site:
- do not create – no site templates will be created;
- link to existing site templates – a possibility is offered to link the site to the current templates for one of the sites;
- copy from site templates – site templates will be copied for the indicated site from the relevant templates for the selected site.