Hi all! I installed an ssl certificate for a domain - example.com and setup the config in nginx as below:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$server_name$request_uri;
}
server {
server_name example.com www.example.com;
include snippets/ssl-example.com.conf;
include snippets/ssl-params.conf;
root /var/www/html/example/example.com/dist;
index index.html;
location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.html;
}
location /.well-known/acme-challenge {
root /var/www/html/example/example.com;
}
error_log /var/log/nginx/example.com-error.log warn;
access_log /var/log/nginx/example.com-access.log combined;
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
# fastcgi_pass unix:/run/php/php7.0-fpm.sock;
#}
location ~ /\.ht {
deny all;
}
}
I get the error below in the browser:
This site can’t provide a secure connection
example.com sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
A check of the nginx error log revealed the lines below:
2017/03/14 17:29:34 [crit] 11795#11795: *382 SSL_do_handshake() failed (SSL: error:14094085:SSL routines:ssl3_read_bytes:ccs received early) while SSL handshaking, client: An IP Address, server: 0.0.0.0:443
Please what am I doing wrong?