Nginx with SSL connection error

2

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?

    
asked by anonymous 12.02.2014 / 19:27

2 answers

2

As I was testing settings in nginx, in the configuration file default that is in /etc/nginx/sites-available/default already had a configuration for ssl for another domain. Probably with the two together and the ssl characteristic of an ip by ssl, they were giving these ssl error when accessing. I only left one and it works normal. But as I was only needing a domain with ssl I left anyway.

    
13.02.2014 / 12:04
0

You can still create a server block for each certificate domain you have ...

You need to declare

ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; ?

This can cause errors with clients using other types of ciphers.

    
13.02.2014 / 17:04