Views: 2855 (Data available since 06.02.2017)
The setup of multiple site in different domains on the IIS server is described based on the assumption that Bitrix Site Manager is already installed.
Changing Settings of the Main Website
- Create two folders, e.g. s1 and s2, in the folder where Bitrix Site Manager is installed.
- Transfer all system folders and files from the folder where Bitrix Site Manager is installed to any of these newly created folders, for example, to s1.
- Run Internet Information Services Manager.
- In IISM go to the website, and in the Action panel go to Advanced settings.
- In the line Physical Path change the path to the new folder with the Bitrix Site Manager installation package.
- Make sure the website opens properly in the browserе.
Creating Symbolic Links
Symbolic links to the system folders bitrix and upload from the folder s2must be created. It can be done by using a special service utility software Junction or a file manager.
The utility software Junction works only on 32-bit systems. On 64-bit systems file managers should be used.
- In order to create or delete a junction point, run Junction software using the following command:
junction [-d] <catalog containing the junction pointя> [<connection object>]
Where, in our case, the catalog containing the junction point is –s2 and the connection object – is the system folders in s1.
- In order to delete a junction point, use the parameter -d and indicate the name of such point.
For convenience sake, the use of file manager is preferred. Let us consider creating file links taking FAR as an example.
- Run FAR file manager.
- Open s1 folder in one window, and s2 folder in another.
- Using the command Alt+F6 create symbolic links to the indicated system folders in the folder s2.
Creating and Setting Up the Second Website in IIS
Create and set up the second website in the general list of IIS websites similarly to the procedure used when creating the main website. Take into account the following differences when creating the new website:
- A physical path to the folder must indicate to the folder s2.
- Indicate the same Application pool for this website as for the main website; do not create it anew.
- Assign a different port for the second website.
Having created the website in IIS, add the file index.php to folder s2.
The next step in the multiple site setup in different domains on IIS is the proper configuration of the websites you created earlier in the software. The website configuration setup procedure is identical both for Apache and IIS.
Websites are set up in the administrative section of either website, e.g. in www.site1.com/bitrix/
- Go to the page Control Panel >Settings > System settings > Websites > Websites.
- Check the parameters of the websites.
The first website must have the following parameters:
Site folder: /
Server URL: www.site1.com
Website name: site1
Path to the web server root folder of this site: /home/www/site1/
The second website must have the following parameters:
Site folder: /
Server URL: www.site2.com
Website name: site2
Path to the web server root folder of this site: /home/www/site2/
Please note that the same "/" website folder is specified for both websites. That is possible because the websites are supported by different web servers which use different catalog on the disk to allocate files.
The domain name should be indicated without www. Using a new line in this field you can enumerate any number of domain names you wish your website to respond to.
It should be noted that the values indicated in the Domain field are used by the product to distribute users’ information to the indicated domains using the UserMultiSiteTransfer technique. It is better to indicate a complete list of the domains your website can respond to.
It is important not to indicate in the domain list the website that does not work on this product copy. Improperly indicated or inexistent domain can slow down system operation. Also, it will actually prevent transferring data to those websites that do not work on the shared copy of the product.
The configuration is ready.