Answer the question
In order to leave comments, you need to log in
How to attach ssl certificate in OpenServer?
I generated a self-signed ssl certificate like this:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout cert.key -out cert.crt
SSLCertificateFile "%sprogdir%/userdata/config/bou.crt"
SSLCertificateKeyFile "%sprogdir%/userdata/config/bou.key"
#-----------------------------------------------#
# Начало блока конфигурации HTTP хоста
#-----------------------------------------------#
<VirtualHost *:%httpport%>
DocumentRoot "%hostdir%"
ServerName "%host%"
ServerAlias "%host%" %aliases%
ScriptAlias /cgi-bin/ "%hostdir%/cgi-bin/"
</VirtualHost>
#-----------------------------------------------#
# Конец блока конфигурации HTTP хоста
#-----------------------------------------------#
#-----------------------------------------------#
# Начало блока конфигурации HTTPS хоста
#-----------------------------------------------#
<VirtualHost *:%httpsport%>
DocumentRoot "%hostdir%"
ServerName "%host%"
ServerAlias "%host%" %aliases%
ScriptAlias /cgi-bin/ "%hostdir%/cgi-bin/"
SSLEngine on
SetEnvIf User-Agent ".*MSIE [1-5].*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
SetEnvIf User-Agent ".*MSIE [6-9].*" \
ssl-unclean-shutdown
SSLCertificateFile "%sprogdir%/userdata/config/bou.crt"
SSLCertificateKeyFile "%sprogdir%/userdata/config/bou.key"
</VirtualHost>
#-----------------------------------------------#
# Конец блока конфигурации HTTPS хоста
#-----------------------------------------------#
Answer the question
In order to leave comments, you need to log in
Well, you generated the keys with the name cert.* and in the config you write bou.* and put the keys in %sprogdir%/userdata/config/ i.e. to the path that you specify in the config. %sprogdir% is the path to the openserver root, e.g. c:\openserver, i.e. full path in this case: c:\openserver\userdata\config\here_keys_generated
Yes, and access to sites by port (see openserver settings, 444 is standard there), i.e. path to the site:
https://your-site:444
Yes, and there are already certificates in the delivery, they are called server.crt and server.key (I have anyway), so it all comes down to go to https://your-site:444
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question