Skip to content
English
  • There are no suggestions because the search field is empty.

Adding aliases for the site in BitrixVM

In order to add an alias for the site, you need to add this additional domain in the configuration files Nginx/Apache and restart web servers.

Nginx

The configuration files are located in the directory:

/etc/nginx/bx/site_enabled/bx_ext_site-name.conf

/etc/nginx/bx/site_avaliable/bx_ext_ssl_site-name.conf

Open each file and find the line server_name my-domain.com.

my-domain.com is the main domain name of your site.

Add an alias after the main domain to this line:

server_name my-domain.com my-domain2.com;

Check

Next, you need to check the changes.

To do this, use the following command.

nginx -t

If you make the correct changes, you will get the following output:

nginx: configuration file /etc/nginx/nginx.conf test is successful

Applying changes

Reboot the web server to apply the changes: 

nginx -s reload

Apache

The configuration file is located in the directory:

/etc/httpd/bx/conf/bx_ext_site-name.conf

Open the file and find the line ServerAlias ​​www.my-domain.com.

where my-domain.com is the main domain name of your site.

Add an alias after the main domain to this line:

ServerAlias ​​www.my-domain.com my-domain2.com;

Check

To check the correctness of the changes run:

apachectl -t

If you make the correct changes, you will get the following output:

Syntax OK

Applying changes

Reboot the web servers to apply the changes:

apachectl graceful

If you have any questions, please create a ticket to technical support.