H
H
hentiamenti2019-10-02 13:41:13
1C-Bitrix
hentiamenti, 2019-10-02 13:41:13

How to install an SSL certificate on CentOS and BitrixVM?

There is an original production server on CentOS 7, it has Bitrix installed with the latest version bitrix-envand an SSL certificate from Let's Encrypt (via certbot-auto).
For testing, a local copy is needed, so BitrixVM was launched in Virtualbox on CentOS 7. The host is running Win 10.
However, if there is a file in the root directory of the production site .htsecurethat is responsible for configuring BitrixVM "access to the site only via https", when deploying a local copies on Virtualbox (through a script restore.phpwith port forwarding :80 localhost to :80 10.0.2.15 guest on Virtualbox) halfway through, predictably redirects to https and the deployment process is interrupted (because there is no certificate). If you remove.htsecurefrom the root of the site, then everything is ok. Bitrix technical support assures that everything will be fine if it is removed, but it’s not very hard to believe that the redirect to https will remain on the original site if, for example, the server is suddenly restarted and the configs are updated. I would like to leave it in the root directory of the original.
It turns out that you need to have SSL in the localhost browser already before deploying the site from the backup. How to achieve the appearance of a green lock even before the site is deployed, already on the Bitrix stub and restore.phpbundled with the fresh BitrixVM, so that the process of unpacking the archive continues with an inevitable redirect?
Namely:
1. What files should be generated, how many and what extension? (e.g. .key or .pem)
2. Install the certificate in the host, guest or both?
3. Will BitrixVM accept a self-signed certificate?
4. In which section of the browser's certificate store should I add a self-signed certificate?
A ton of manuals for openssl, mkcert, etc. have already been tried, but not a single set of generated key and certificate files (+ installing them in browsers) has worked, despite the normal behavior of nginx when restarting the service with changed configs. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-01-09
@shambler81

Depending on the version of Bitrix vm
1. you have vm up to 7 then (for example 6) https://klondike-studio.ru/blog/bitrix-virtualnaya...
2. if you have 7.0.1 https://klondike- studio.ru/blog/ssl-na-bitriks-vir...
3. if you have before 7.4.2 everything is already in the menu 8--> 3 --> 1 how it works wrote here https://klondike- studio.ru/blog/bitrix-vm-ne-obnov...
4. if you have 7.4.4 and higher, then there is already a regular certbot also through the menu

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question