2
I created an SSL certificate to test on the server and configured in Nginx as follows:
# HTTPS server
#
server {
listen 443;
server_name kriaki.com.br;
root /home/ubuntu/public_kriaki;
index index.html index.htm;
ssl on;
ssl_certificate /etc/nginx/ssl/kriaki.com.br.cert;
ssl_certificate_key /etc/nginx/ssl/kriaki.com.br.key;
#
# ssl_session_timeout 5m;
#
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
# ssl_prefer_server_ciphers on;
#
# location / {
# try_files $uri $uri/ =404;
# }
}
I saved and used the following command to check that everything is ok:
sudo nginx -t -c /etc/nginx/nginx.conf
And everything ok. I restarted Nginx, and went to the url with https://
and the browser returns the error: Código de erro: ERR_SSL_PROTOCOL_ERROR
Is the error in the certificate? But I did it as I always do:
sudo openssl req -new -newkey rsa:2048 -nodes -keyout kriaki.com.br.key -out kriaki.com.br.csr
sudo openssl x509 -in kriaki.com.br.csr -out kriaki.com.br.cert -req -signkey kriaki.com.br.key -days 30
What could be?
I solved here, in the configuration file
default
i had enabled another certificate and for some reason gave conflict. I have other domains on the server that when I access them onhttps://
they try to access the certificate I put up there that is specific to that domain. I leftserver_name
of course tokriaki.com.br
, because the other domains are also carrying the same certificate of kriaki.com.br?– Gilson José
Gilson, answer your own question, and describe in detail how you did it. After two days mark it as certain
– Emerson Rocha