Renouvellement de certificat


#41

When I test i have this error cloud.hugoclo411.xyz hugoclo411.xyz MISMATCH


#42

nginx -t
nginx: [warn] “ssl_stapling” ignored, issuer certificate not found for certificate “/etc/nginx/ssl/server.crt”
nginx: [warn] conflicting server name “_” on 0.0.0.0:443, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful


#43

both are minor problems

This is good news!!!
Try restarting nginx and renewing.


#44

It’s :
acme.sh --issue -d chat.hugoclo411.xyz --pre-hook “systemctl stop nginx” --standalone --post-hook “systemctl start nginx” --ecc --keylength ec-384


#45

acme.sh --list


#46

acme.sh --issue --force -d chat.hugoclo411.xyz --pre-hook “systemctl stop nginx” --standalone --post-hook “systemctl start nginx” --ecc --keylength ec-384
[Mon Dec 17 19:15:40 CET 2018] Run pre hook:‘systemctl stop nginx’
[Mon Dec 17 19:15:40 CET 2018] Standalone mode.
[Mon Dec 17 19:15:40 CET 2018] Single domain=‘chat.hugoclo411.xyz’
[Mon Dec 17 19:15:40 CET 2018] Getting domain auth token for each domain
[Mon Dec 17 19:15:40 CET 2018] Getting webroot for domain=‘chat.hugoclo411.xyz’
[Mon Dec 17 19:15:40 CET 2018] Getting new-authz for domain=‘chat.hugoclo411.xyz’
[Mon Dec 17 19:15:41 CET 2018] The new-authz request is ok.
[Mon Dec 17 19:15:41 CET 2018] chat.hugoclo411.xyz is already verified, skip http-01.
[Mon Dec 17 19:15:41 CET 2018] Verify finished, start to sign.
[Mon Dec 17 19:15:44 CET 2018] Cert success.
-----BEGIN CERTIFICATE-----
MIIErzCCA5egAwIBAgISA4eZk1KK3woILLrltXN2e449MA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODEyMTcxNzE1NDNaFw0x
OTAzMTcxNzE1NDNaMB4xHDAaBgNV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z267kjk
ZpCvWMnVh1uhONoIbBJmwT+rX7CSlQF0gVExdJ/qnC40TwzkZIrWYfhYGU5LIXBK
lEmlce1Tv1XtWp3mMrQvKB36jJWlcietlJFpRjZK/ZHAU9Nh2dw6/CGUwNd5IjeI
MhyLVRSgvx+bKyp+mBmt52tr23fhI+c3rKKaflWjvxrjdB2sakUQPOIvkBVmDX/S
0ItAVXmInrGY7YWE2LshjWmElH+G+8yjcOsckdMR2FUqx4ZasntsRZq82eDG1klB
ag0I42xIFrJnmDfh8OXBfgwciiju7hUQ9g3THGi8yk1fnIuE1VK2vF9gLq/Xsfia
MfZS
-----END CERTIFICATE-----
[Mon Dec 17 19:15:44 CET 2018] Your cert is in /root/.acme.sh/chat.hugoclo411.xyz_ecc/chat.hugoclo411.xyz.cer
[Mon Dec 17 19:15:44 CET 2018] Your cert key is in /root/.acme.sh/chat.hugoclo411.xyz_ecc/chat.hugoclo411.xyz.key
[Mon Dec 17 19:15:44 CET 2018] The intermediate CA cert is in /root/.acme.sh/chat.hugoclo411.xyz_ecc/ca.cer
[Mon Dec 17 19:15:44 CET 2018] And the full chain certs is there: /root/.acme.sh/chat.hugoclo411.xyz_ecc/fullchain.cer
[Mon Dec 17 19:15:44 CET 2018] Run post hook:‘systemctl start nginx’
root@dedi-par-61445op-netcom:/home/hugoclo# acme.sh --install-cert -d chat.hugoclo411.xyz --ecc --cert-file /etc/nginx/acme.sh/chat.hugoclo411.xyz/cert.pem --key-file /etc/nginx/acme.sh/chat.hugoclo411.xyz/key.pem --fullchain-file /etc/nginx/acme.sh/chat.hugoclo411.xyz/fullchain.pem --reloadcmd “systemctl reload nginx.service”
[Mon Dec 17 19:16:06 CET 2018] Installing cert to:/etc/nginx/acme.sh/chat.hugoclo411.xyz/cert.pem
[Mon Dec 17 19:16:06 CET 2018] Installing key to:/etc/nginx/acme.sh/chat.hugoclo411.xyz/key.pem
[Mon Dec 17 19:16:06 CET 2018] Installing full chain to:/etc/nginx/acme.sh/chat.hugoclo411.xyz/fullchain.pem
[Mon Dec 17 19:16:06 CET 2018] Run reload cmd: systemctl reload nginx.service
[Mon Dec 17 19:16:06 CET 2018] Reload success


#47

acme.sh --list
Main_Domain KeyLength SAN_Domains Created Renew
chat.hugoclo411.xyz “ec-384” no Mon Dec 17 18:15:44 UTC 2018 Fri Feb 15 18:15:44 UTC 2019
cloud.hugoclo411.xyz “ec-384” no Wed Dec 5 18:13:13 UTC 2018 Sun Feb 3 18:13:13 UTC 2019
pyload.hugoclo411.xyz “ec-384” no Thu Nov 1 08:53:29 UTC 2018 Mon Dec 31 08:53:29 UTC 2018


#48

OK you can now use that cert (in the right place - configuration file: /etc/nginx/sites-enabled/nextcloud.conf)
change:
ssl_certificate /etc/letsencrypt/live/chat.hugoclo411.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/chat.hugoclo411.xyz/privkey.pem; # managed by Certbot
to:
ssl_certificate /root/.acme.sh/chat.hugoclo411.xyz_ecc/fullchain.cer;
ssl_certificate_key /root/.acme.sh/chat.hugoclo411.xyz_ecc/chat.hugoclo411.xyz.key;

Or you could try issuing it with certbot-auto:
./certbot-auto --nginx -d cloud.hugoclo411.xyz

and as always, restart nginx.


#49

sure : chat. or cloud.?


#50

Sorry got chat and cloud confused…
Use cloud in nextcloud.conf file


#51

./certbot-auto --nginx -d cloud.hugoclo411.xyz
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for cloud.hugoclo411.xyz
Cleaning up challenges
nginx: [warn] “ssl_stapling” ignored, issuer certificate not found for certificate “/etc/nginx/ssl/server.crt”
nginx: [warn] conflicting server name “_” on 0.0.0.0:443, ignored
nginx: [error] invalid PID number “” in “/var/run/nginx.pid”
An unexpected error occurred:
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 59: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.


#52

OMG!!!
Just stick with ACME.SH


#53

I don’t understand “Just stick with ACME.SH”


#54

Just use the acme.sh method.


#55

Just stick with ACME.SH
Here “stick with” means “stay with” / “be with”


#56

/home/hugoclo# acme.sh --issue --force -d cloud.hugoclo411.xyz --pre-hook “systemctl stop nginx” --standalone --post-hook “systemctl start nginx” --ecc --keylength ec-384
[Mon Dec 17 19:36:18 CET 2018] Run pre hook:‘systemctl stop nginx’
[Mon Dec 17 19:36:18 CET 2018] Standalone mode.
[Mon Dec 17 19:36:18 CET 2018] Single domain=‘cloud.hugoclo411.xyz’
[Mon Dec 17 19:36:18 CET 2018] Getting domain auth token for each domain
[Mon Dec 17 19:36:18 CET 2018] Getting webroot for domain=‘cloud.hugoclo411.xyz’
[Mon Dec 17 19:36:18 CET 2018] Getting new-authz for domain=‘cloud.hugoclo411.xyz’
[Mon Dec 17 19:36:20 CET 2018] The new-authz request is ok.
[Mon Dec 17 19:36:20 CET 2018] cloud.hugoclo411.xyz is already verified, skip http-01.
[Mon Dec 17 19:36:20 CET 2018] Verify finished, start to sign.
[Mon Dec 17 19:36:23 CET 2018] Cert success.
-----BEGIN CERTIFICATE-----
MIIEtDCCA5ygAwIBAgISA8FIkt+uuSPysz3ZQvYbVt74MA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODEyMTcxNzM2MjFaFw0x
OTAzMTcxNzM2MjFaMB8xHTAbBgNVBAMTFGNsb3VkLmh1Z29jbG80MTEueHl6MHYw
EAYHKoZIzj0CAQYFK4EEACIDYgAEMD0R6F6faurlx4mKo0Gi5IIjlalpMhItTTxx
m+21kgLRqPLFcniY41hfst+DyaciUM8fvbwgsA2RuFuXYKKUy/Fr/112njjWRsND
3ljdkVl77l5JwCEGqQ3C7pnb+5D0o4ICazCCAmcwDgYDVR0PAQH/BAQDAgeAMB0G
A1UdJQQWMB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55hQfkDE0GfQOUxRrvV3fo
LtVSr3NmDfRZ8T7m/gRhExMxVFZVRqGMbhClLB+Xl2hXBNR1ueo6nkxu1/AkUBLs
SFjBZ/5LkpE=
-----END CERTIFICATE-----
[Mon Dec 17 19:36:23 CET 2018] Your cert is in /root/.acme.sh/cloud.hugoclo411.xyz_ecc/cloud.hugoclo411.xyz.cer
[Mon Dec 17 19:36:23 CET 2018] Your cert key is in /root/.acme.sh/cloud.hugoclo411.xyz_ecc/cloud.hugoclo411.xyz.key
[Mon Dec 17 19:36:23 CET 2018] The intermediate CA cert is in /root/.acme.sh/cloud.hugoclo411.xyz_ecc/ca.cer
[Mon Dec 17 19:36:23 CET 2018] And the full chain certs is there: /root/.acme.sh/cloud.hugoclo411.xyz_ecc/fullchain.cer
[Mon Dec 17 19:36:23 CET 2018] Run post hook:‘systemctl start nginx’
root@dedi-par-61445op-netcom:/home/hugoclo# systemctl start nginx
root@dedi-par-61445op-netcom:/home/hugoclo# acme.sh --install-cert -d cloud.hugoclo411.xyz --ecc \

–cert-file /etc/nginx/acme.sh/cloud.hugoclo411.xyz/cert.pem
–key-file /etc/nginx/acme.sh/cloud.hugoclo411.xyz/key.pem
–fullchain-file /etc/nginx/acme.sh/cloud.hugoclo411.xyz/fullchain.pem
–reloadcmd “systemctl reload nginx.service”
[Mon Dec 17 19:37:40 CET 2018] Installing cert to:/etc/nginx/acme.sh/cloud.hugoclo411.xyz/cert.pem
/root/.acme.sh/acme.sh: line 4679: /etc/nginx/acme.sh/cloud.hugoclo411.xyz/cert.pem: No such file or directory


#57

We are good to here:

We must have missed the “_ecc” in the file name!


#58

Should be:
ssl_certificate /root/.acme.sh/cloud.hugoclo411.xyz_ecc/fullchain.cer;
ssl_certificate_key /root/.acme.sh/cloud.hugoclo411.xyz_ecc/cloud.hugoclo411.xyz.key;


#59

Where did those files comes from?
/etc/nginx/acme.sh/cloud…???


#60

I don’t think you need to call acme.sh to install the cert.
We did that manually already.