简体   繁体   中英

ERR_SSL_PROTOCOL_ERROR with Nginx & certbot

I am trying to install a webserver on Raspberry. I installed nginx and certbot and generated SSL certificate using: sudo certbot certonly --webroot -w /home/pi/webapp01 -d godestalbin.com -d www.godestalbin.com My Nginx config is now:

server {
   listen 443 ssl;
   server_name godestalbin.ga www.godestalbin.ga;
   ssl_certificate /etc/letsencrypt/live/godestalbin.ga/fullchain.pem;
   ssl_certificate_key /etc/letsencrypt/live/godestalbin.ga/privkey.pem;

   location / {
      root /home/pi/webapp01;
   }
}

server {
  listen 80;
  server_name godestalbin.ga;
  return 301 https://$host$request_uri;
}

However, I cannot display my website in Chrome which display

Ce site ne peut pas fournir de connexion sécuriséewww.godestalbin.ga a envoyé une réponse incorrecte.
This site cannot provide a secure connection
www.godestalbin.ga gave an incorrect answer
Essayez d'exécuter les diagnostics réseau de Windows.
Try to execute Windows diagnostics
ERR_SSL_PROTOCOL_ERROR

If I display locally on the raspberry my site, I can see the page (I guess because Chromium is less strict about secutiry). It also says the certificate is invalid (I guess because localhost does not match godestalbin.ga of the certificate). I am able to display the details of the certificate (see screen copy). 在此处输入图像描述

I also take a look at the analysis given by: https://check-your-website.server-daten.de/?q=godestalbin.ga

https://godestalbin.ga/
88.127.87.207
Http-Status: -4

SendFailure - The underlying connection was closed: An unexpected error occurred on a send.

You generated certbot SSL with domain: www.godestalbin.com

sudo certbot certonly --webroot -w /home/pi/webapp01 -d godestalbin.com -d www.godestalbin.com

But you configured nginx with server_name godestalbin.ga www.godestalbin.ga;

Please correct them as same domain only.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM