I created an SSL certificate to test on the server and configured it 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 if everything is ok:
sudo nginx -t -c /etc/nginx/nginx.conf
And all okay. I reinstalled Nginx, and I 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 it be?