• Applications
  • [Discussion] Certificat SSL signé et gratuit avec Let's Encrypt

Bonjour,
Quand je veux faire un renouvellement de mon certifat avec:
service nginx stop
./certbot-auto renew
service nginx start
Après "./certbot-auto renew" j'ai un message d'erreur (-bash: ./certbot-auto: Aucun fichier ou dossier de ce type)

Je précise que je suis à la racine quand je lance la commande.

C'est du à quoi ?
Merci
Arcenik

fait ceci :

service nginx stop

apt-get update && apt-get upgrade

cd /tmp
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
./certbot-auto --help all

./certbot-auto renew
service nginx start

J'ai un souci.

Processing /etc/letsencrypt/renewal/myhost.me.conf

Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator standalone, Installer None
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for myhost.me
tls-sni-01 challenge for www.myhost.me
Cleaning up challenges
Attempting to renew cert (myhost.me) from /etc/letsencrypt/renewal/myhost.me.conf produced an unexpected error: Problem binding to port 443: Could no t bind to IPv4 or IPv6.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/myhost.me/fullchain.pem (failure)


All renewal attempts failed. The following certs could not be renewed:

/etc/letsencrypt/live/myhost.me/fullchain.pem (failure)

1 renew failure(s), 0 parse failure(s)

C'est un problème avec le port 443 si je comprends bien ?

spider1163 je viens de le refaire en vérifiant bien que le serveur était coupé et ça à fonctionné.
J'ai du faire le couillon.

Merci pour votre aide.
Arcenik

4 mois plus tard

Bonjour,

Sur un serveur vierge, je fais la commande suivante :

certbot certonly -d toto1515.fr

Et j'ai le message d'erreur suivant :

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 266: ordinal not in range(128)

J'ai déjà passé tout le système en UTF-8 et aucun changement, avez vous une idée?
Merci

spider1163 Oui c'est bien ce que j'ai vu. J'ai donc fait un raz de mon serveur, j'ai installé nginx, et directement testé la commande. Donc mon fichier nginx est le fichier par défaut, et aucun changement.

    xavier
    J'ai essayé ton script, cela ne fonctionnait pas, puis après une enième changement UTF-8; c'est passé !

    Merci à toi 😃

    6 mois plus tard

    Salut
    Je viens d'avoir une galère pour renouveler mes certifs sur le vps en debian 7 (ouais je sais, debian 7.....)
    Le dernier Cerbot ne passe plus, et histoire d'avoir 3 mois de rab pour attendre debian 10 pour mettre à jour, y'a une soluce.

    Donc ça servira peut-être à quelqu’un d'aussi à la bourre que moi:

    service nginx stop
    cd /tmp
    git clone --branch 0.30.x https://github.com/letsencrypt/letsencrypt
    cd letsencrypt
    ./letsencrypt-auto renew --no-self-upgrade --no-bootstrap
    service nginx start
    

    Ex.

    8 mois plus tard

    Je ne comprends pas, lorsque je vais sur HTTP://IP/rutorrent/, ça fonctionne et sur HTTPS://IP/rutorrent/ j'ai une 404, des idées d'où ça pourrai venir ?

      ok, du coup c'est quoi l'erreur ?

      18 jours plus tard

      Décidément, mon changement de serveur ne se passe pas aussi bien que prévu, je rencontre un problème avec Let's encrypt, en fait je remarque que mon site est inaccessible en HTTPS, et de plus lorsque je teste via un site tel que SSLLABS j'ai en retour une erreur voilà des différents éléments.

      La présence du certificat :

      root@PAR-179764:/etc/letsencrypt/live/www.mantyplex.ovh# ls -l
      total 4
      lrwxrwxrwx 1 root root  41 Jan 16 08:56 cert.pem -> ../../archive/www.mantyplex.ovh/cert1.pem
      lrwxrwxrwx 1 root root  42 Jan 16 08:56 chain.pem -> ../../archive/www.mantyplex.ovh/chain1.pem
      lrwxrwxrwx 1 root root  46 Jan 16 08:56 fullchain.pem -> ../../archive/www.mantyplex.ovh/fullchain1.pem
      lrwxrwxrwx 1 root root  44 Jan 16 08:56 privkey.pem -> ../../archive/www.mantyplex.ovh/privkey1.pem
      -rw-r--r-- 1 root root 692 Jan 16 08:56 README

      Mon fichier params.conf :

      ssl_session_timeout 1d;
          ssl_session_cache shared:SSL:50m;
          ssl_session_tickets off;
      
          ssl_ecdh_curve secp384r1;
      
          ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
          ssl_ciphers "ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA";
      
          ssl_prefer_server_ciphers on;
      
          add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
          add_header X-Content-Type-Options nosniff;
          add_header X-Frame-Options "SAMEORIGIN";
          add_header X-XSS-Protection "1; mode=block";
          add_header X-Robots-Tag none;
      
          ssl_stapling on;
          ssl_stapling_verify on;
      
          ssl_trusted_certificate /etc/letsencrypt/live/www.mantyplex.ovh/fullchain.pem;
      
          resolver 8.8.8.8;

      Et mon fichier rutorrent.conf (partie nécessaire) :

      include /etc/nginx/conf.d/log_rutorrent.conf;
      
      server {
              listen 80 default_server;
              listen 443 default_server ssl http2;
              server_name www.mantyplex.ovh;
      
              index index.html index.php;
              charset utf-8;
              client_max_body_size 10M;
      
              ssl_certificate /etc/letsencrypt/live/www.mantyplex.ovh/fullchain.pem;
              ssl_certificate_key /etc/letsencrypt/live/www.mantyplex.ovh/privkey.pem;
      
              include /etc/nginx/conf.d/ciphers.conf;
      
              access_log /var/log/nginx/rutorrent-access.log combined if=$loggable;
              error_log /var/log/nginx/rutorrent-error.log error;
      
              error_page 500 502 503 504 /50x.html;
      
              auth_basic "seedbox";
              auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
      
              root /var/www;
      
              location = /favicon.ico {
                      access_log off;
                      log_not_found off;
              }
      
              location = /50x.html {
                      root /usr/share/nginx/html;
              }
      
              location ~ \.php$ {
                      fastcgi_index index.php;
                      include /etc/nginx/fastcgi_params;
                      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                      fastcgi_pass unix:/run/php/php7.3-fpm.sock;

      Si vous pouviez m'éclairer ça serait top 😉

      Encore merci à vous.

      Ps HS: Comment se connecter en root FTP avec OP ?

      7 mois plus tard

      Bonjour tout le monde.
      Je suis embêté pour renouveler mon certificat depuis qques jours.
      J'ai pu installer le certificat sans aucun problème il y a 3 mois sur ce même serveur sous Debian 10 en suivant scrupuleusement ce tuto.
      En essayant de renouveler, je rencontre cette erreur :

      root@shuttle-plex:/usr/local/bin#  ./certbot-auto renew --pre-hook "service nginx stop" --post-hook "service nginx start"
      
      Saving debug log to /var/log/letsencrypt/letsencrypt.log
      
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Processing /etc/letsencrypt/renewal/mondomaine.org.conf
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Cert is due for renewal, auto-renewing...
      Plugins selected: Authenticator standalone, Installer None
      Running pre-hook command: service nginx stop
      Renewing an existing certificate
      Performing the following challenges:
      http-01 challenge for mondomaine.org
      Waiting for verification...
      Challenge failed for domain mondomaine.org
      http-01 challenge for mondomaine.org
      Cleaning up challenges
      Attempting to renew cert (mondomaine.org) from /etc/letsencrypt/renewal/mondomaine.org.conf produced an unexpected error: Some challenges have failed.. Skipping.
      All renewal attempts failed. The following certs could not be renewed:
        /etc/letsencrypt/live/mondomaine.org/fullchain.pem (failure)
      
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      
      All renewal attempts failed. The following certs could not be renewed:
        /etc/letsencrypt/live/mondomaine.org/fullchain.pem (failure)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Running post-hook command: service nginx start
      1 renew failure(s), 0 parse failure(s)
      
      IMPORTANT NOTES:
       - The following errors were reported by the server:
      
         Domain: mondomaine.org
         Type:   connection
         Detail: Fetching
         http://mondomaine.org/.well-known/acme-challenge/J7bxRjwUMA0PAhaIxLrTYP-uiG_U7fmoit2yAeAn-II:
         Timeout during connect (likely firewall problem)
      
         To fix these errors, please make sure that your domain name was
         entered correctly and the DNS A/AAAA record(s) for that domain
         contain(s) the right IP address. Additionally, please check that
         your computer has a publicly routable IP address and that no
         firewalls are preventing the server from communicating with the
         client. If you're using the webroot plugin, you should also verify
         that you are serving files from the webroot path you provided.
      

      J'ai tenté pas mal de choses mais j'en reviens toujours à cette erreur.
      Si quelqu'un à une idée, je suis preneur.
      Merci !

        Tu as un problème de DNS soit ton domaine.org renvoi pas vers la bonne adresse. Soit les ports 80 et 443 à destination de ton shuttle-plex sont fermés ?
        Peut-être une mise à jour de certbot / letsencrypt à prévoir ?
        Il y a un plugin pour nginx qui évite le prehook posthook...

        fana hello, le domaine en question est bien accessible "publiquement" depuis le port 80 (http) ?

        Effectivement je viens de m'apercevoir que j'avais laissé une DMZ qui me foutait la zone sur le routeur.
        Merci 😉