Views: 10036
Last Modified: 15.09.2014

The main requirement for a multiple site in one domain is separation of sites by subcatalogs so that the file structure does not overlap. Each site must be located in a separate subcatalog inside the root catalog.

In this case, the creation of equivalent folders in the root catalog structure and the creation of folders for the second site inside the directory of the first site are possible. I.e., the following combinations are acceptable:

  • /www/s1/ - first site,
  • /www/s2/ - second site.
And these combinations are acceptable, too:
  • /www/s1/ - first site,
  • /www/s1/s2 – second site.
The training course focuses on the option with the websites located on the same level. When locating websites on different nesting levels the actions are the same, but the paths to the second site will differ.

The system is delivered with a multiple site configuration in one domain. Additional settings in the file httpd.conf of Apache web server are not necessary, it is enough to just create the required folders and correctly complete fields in site settings.

Setup of Multiple Site in One Domain

In order to determine settings for a multiple site in one domain we have one web server Apache, which DocumentRoot is configured to the catalog /home/www/allsites/.

Note:
The path to the site root in the server file system is set up in the web server settings, for example:
  • For Apache - in the file httpd.conf, parameter DocumentRoot;
  • For IIS - in the site properties, tab Home Directory > Local Path.

Install Bitrix Site Manager software into this catalog.

Each site in the first configuration option must be located in a separate subcatalog inside a unified catalog, e.g.:

  • /home/www/allsites/s1/
  • /home/www/allsites/s2/

The names of catalogs s1 and s2 can be different, e.g. shop and company, or en and de, accordingly. One of the sites can also be located in the root catalog (e.g., /home/www/allsites/), and the second site in the subcatalog (e.g., /home/www/allsites/s2/).

Website Configuration

Websites are configured in the Administrative part of the system (Control Panel > Settings > > System settings > Websites > Websites).

Let us set up parameters for site No. 1:

  • Name: site1
  • Domain: leave empty
  • Site folder: /s1/
  • Website name: Corporate Website of " Company Name"
  • Server URL: www.site1.com/s1
  • Path to the web server root folder of this site: leave empty

The parameter "Site folder" must contain the path from the root to the catalog where the public part of the site is located. "Path to the web server root folder of this site" is not used in this multisite configuration option and should be left empty for all websites.

Similarly, let us set up parameters for site No. 2:

  • Name: site2
  • Domain: leave empty
  • Site folder: /s2/
  • Website name: E-Store of "Company Name"
  • Server URL: www.site1.com/s2
  • Path to the web server root folder of this site: leave empty
Note:

Multiple site in one domain on IIS web server is implemented similarly to the procedure used for Apache server.




Courses developed by Bitrix24

 Start the course