SSL installation

1. To install SSL-certificate for a virtual server in the BitrixVM panel, you must have a certificate file and a private key file in unencrypted form. Copy these files to the following directory:

/ etc / nginx / ssl...

2. By default, BitrixVM uses vi editor. It is recommended to install and use the more familiar nano editor. To do this, run the command:

yum install -y nano

3. Save a copy of the configuration file for SSL. You can choose the name arbitrarily, for example inferno-ssl.conf:

cp /etc/nginx/bx/conf/ssl.conf / etc / nginx / bx / conf / inferno-ssl.conf

4. Using an editor, open the created inferno-ssl.conf file and delete the lines in it:

ssl_certificate /etc/nginx/ssl/cert.crt;

ssl_certificate_key /etc/nginx/ssl/cert.key;

5. Edit the configuration file for the SSL site zone. These files are created when adding a site through the BitrixOS menu.

6.Edit the configuration file for the SSL-zone of the site (these files are generated automatically when creating a site through the BitrixOS menu).

Go to the / home / bitrix / www directory. For the main site, the file is called / etc / nginx / bx / site_enabled /ssl.s1.conf. For other sites, the files look like/ etc / nginx / bx / site_enabled /

In the files, you need to replace the line:

include bx / conf / ssl.conf;

to the next line

include bx / conf / inferno-ssl.conf;

7. After the replaced line, add the certificate. Provide the full path to the unencrypted certificate and private key files you copied in step 1.

ssl_certificate /full/path/to/certificate-file.crt;

ssl_certificate_key /full/path/to/key-file.key;

8. To check the configuration Nginx enter:

nginx -t

9. Restart the server to apply the settings:

service nginx restart

10. The certificate is installed.

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