M
M
MaximMRX2017-11-29 22:02:15
Python
MaximMRX, 2017-11-29 22:02:15

SSL in openserver? Doesn't work out of the box?

Good day. It seems like it is written that SSL works out of the box in openserver, as a result, when you open the site via https, this is the error. 5a1f03d95b0af667755864.png
Maybe you need to do something else, in the Openserver settings I set only php7 and Apache for php7
PS: in the Apache console it says: Server certificate does NOT include an ID which matches the server name

Answer the question

In order to leave comments, you need to log in

6 answer(s)
P
pfemidi, 2019-09-14
@pfemidi

Well, the contents of the file on the output are clearly visible that in UTF-8, and in the console of the plunger CP866. So you need to recode either the contents of the file from UTF-8 to CP866, or in the program, before outputting myline, transfer myline from UTF-8 to CP866. And PyCharm has nothing to do with it.

M
MaximMRX, 2017-12-02
@GM_pAnda

Suffered for 3 days. Solution found.
We go to OSPanel\modules\http\YourVersion\conf
And change generate.bat there New contents of generate (using the app.ru domain as an example):

@echo off
set OPENSSL_CONF=%~dp0..\conf\openssl.cnf
..\bin\openssl req -x509 -sha256 -newkey rsa:2048 -nodes -days 5475 -keyout rootCA.key -out rootCA.crt -subj "/CN=GM_pAnda/"
..\bin\openssl req -newkey rsa:2048 -nodes -days 5475 -keyout server.key -out server.csr -subj "/CN=app.ru/"
..\bin\openssl x509 -req -sha256 -days 5475 -in server.csr -extfile v3.txt -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out server.crt
..\bin\openssl dhparam -out dhparam.pem 2048

The contents of the v3.txt file (you need to create it in the conf folder next to generate.bat):
nsComment              = "Open Server Panel Generated Certificate"
basicConstraints       = CA:false
subjectKeyIdentifier   = hash
authorityKeyIdentifier = keyid,issuer
keyUsage               = nonRepudiation, digitalSignature, keyEncipherment

subjectAltName = @alt_names
[alt_names]
DNS.1 = app.ru

We start bat. We are waiting for about 5-10. Depends on iron.
As the console closed, it means that the certificates were generated, for apache you need two files (rootCA.crt, server.crt), copy them to "OSPanel\userdata\config\cert_files" with a replacement.
Next, copy the "Apache-********_vhost.conf" file from OSPanel\userdata\config to the site folder.
in my example, this is the "Apache-PHP-7_vhost.conf" file. It already depends on your OSPanel configuration.
We also install the certificate on the computer. Run the file rootCA.crt and set it strictly to "trusted root certification authorities".
And install server.crt. To the personal. You need to restart your browser. restart OSPanel. We rejoice.

E
ErrorMan, 2019-01-31
@ErrorMan

After the method above, open server stopped running !!! Read all the comments carefully.

D
Dashunia, 2019-10-11
@Dashunia

I did everything as written, everything works, thanks.
5da03c3da4202883120187.png

A
ay232, 2019-12-11
@ay232

After execution - the server ceased to be started. Now there is a hemorrhoid to restore performance ((((author - drink poison

A
acabun, 2021-04-11
@acabun

I advise you to save the old certificates before starting the procedures. Since this method does not work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question