Installation of SSL Certificate in BitrixVM

To install an SSL certificate on the BitrixVM server, you need two main files: a certificate (or a certificate chain in the following order: the certificate itself, the root certificate, and intermediate certificates) and a private key in unencrypted format.

Copy these files to the directory /etc/nginx/ssl on the server.

To streamline the working process, we recommend installing the text editor nano instead of the default vi in Bitrix 7. You can do this with the following command:

yum install -y nano

After that, perform the following actions:

  1. Create a copy of the base SSL configuration file, for instance, named twssl.conf:
cp /etc/nginx/bx/conf/ssl.conf /etc/nginx/bx/conf/twssl.conf
  1. Open the new file twssl.conf using your chosen text editor and remove the following lines:
ssl_certificate      /etc/nginx/ssl/cert.crt;
ssl_certificate_key  /etc/nginx/ssl/cert.key;
  1. Edit the configuration file for the SSL zone of your site (these files are automatically created when a site is created via the BitrixOS menu).
  • For the main site located in the directory /home/bitrix/www, this is the file /etc/nginx/bx/site_enabled/ssl.s1.conf;
  • For other sites, these are files named like /etc/nginx/bx/site_enabled/

Replace the line in the required file:

include bx/conf/ssl.conf;


include bx/conf/twssl.conf;
  1. After this line, add the following lines, providing the full path to the certificate file (or certificate chain) and the unencrypted private key file:
ssl_certificate /full/path/to/certificate_file.crt;
ssl_certificate_key /full/path/to/key_file.key;
  1. Check the Nginx configuration:
nginx -t
  1. If no errors are found, restart the web server to apply the settings:
service nginx restart

The certificate is now successfully installed. Ensure that your site is functioning correctly.

Have more questions about Hosting?