You are welcome, but the thanks is owed to @Jailer, he got you there. One of my next projects im going to spin up a nginx server so I can learn a little more about it. Cheers bud, glad it worked out for you.NICE..!!!!!!!!!!! I AM SO HAPPYY..!!! THANKS guys..!
@Jailer
after adding that section, changing the websites, and some more edits, i got the certbot certonly CONGRATULATIONS screen..! :)
@John Digital
THANKS MAN..! i really appreaciate all the help you provided, between you and jailer did it..! I LOVE YOU BOTH.!
now, one last question, how can i make it so that once a month the certificate is renewed? Thanks..
Ok this didn't work after all but a script file does. You can create it in the root of your jail and call it from cron.@Jailer
OK, this is how i did it, is it correct? If I understand it right, it should run the command at 9:00am and 8:00pm....
![]()
ee /renew.sh
#!/bin/sh /usr/local/bin/certbot renew --quiet
jexec nameofyourjail csh /renew.sh
certbot renew -a standalone --server https://acme-v01.api.letsencrypt.org/directory --pre-hook "service nginx stop" --post-hook "service nginx start
chmod +x renew.sh
Did you create the file in the root of the jail like I described in my previous post?[Inside the email:] /renew.sh: No such file or directory.
I followed, EXACLTY what you posted, when you say root of the jail, what does that mean? because when i jexec into it, I see this:Did you create the file in the root of the jail like I described in my previous post?
I suspect it may be because the file is not executable and also be sure the script file is in the root of the jail. From the owncloud jails rootchmod +x renew.sh
#!/bin/sh /usr/local/bin/certbot renew --post-hook "apachectl -k graceful" --quiet
Odd I have the same permissions and mine works. I also have a script in another jail for a rsync task with the same permissions and it runs just fine too.File not executable. I have almost identical setup and it works. Only difference is my script is named differently.
root@apache:/ # mv cert_renewal.sh renew.sh root@apache:/ # chmod -x renew.sh root@apache:/ # /renew.sh /renew.sh: Permission denied. root@apache:/ # chmod +x renew.sh root@apache:/ # nano renew.sh
root@apache:/ # /renew.sh Saving debug log to /var/log/letsencrypt/letsencrypt.log ------------------------------------------------------------------------------- Processing /usr/local/etc/letsencrypt/renewal/owncloud.xxxx.org.conf ------------------------------------------------------------------------------- Cert not yet due for renewal ------------------------------------------------------------------------------- Processing /usr/local/etc/letsencrypt/renewal/xxxx.xxxx.org.conf ------------------------------------------------------------------------------- Cert not yet due for renewal ------------------------------------------------------------------------------- Processing /usr/local/etc/letsencrypt/renewal/xxxx.org.conf ------------------------------------------------------------------------------- Cert not yet due for renewal ------------------------------------------------------------------------------- Processing /usr/local/etc/letsencrypt/renewal/xxxx.club.conf ------------------------------------------------------------------------------- Cert not yet due for renewal ------------------------------------------------------------------------------- Processing /usr/local/etc/letsencrypt/renewal/xxxx.xxxx.org.conf ------------------------------------------------------------------------------- Cert not yet due for renewal ------------------------------------------------------------------------------- Processing /usr/local/etc/letsencrypt/renewal/xxxx.net.conf ------------------------------------------------------------------------------- Cert not yet due for renewal The following certs are not due for renewal yet: /usr/local/etc/letsencrypt/live/owncloud.xxxx.org/fullchain.pem (skipped) /usr/local/etc/letsencrypt/live/xxxx.xxxx.org/fullchain.pem (skipped) /usr/local/etc/letsencrypt/live/xxxx.org/fullchain.pem (skipped) /usr/local/etc/letsencrypt/live/xxxx.club/fullchain.pem (skipped) /usr/local/etc/letsencrypt/live/xxxx.xxxx.org/fullchain.pem (skipped) /usr/local/etc/letsencrypt/live/xxxx.net/fullchain.pem (skipped) No renewals were attempted. No renewals attempted, so not running post-hook
root@apache:/ # tail /var/log/letsencrypt/letsencrypt.log 2017-01-09 20:22:33,823:DEBUG:certbot.main:Arguments: ['--post-hook', 'apachectl -k graceful'] 2017-01-09 20:22:33,824:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone) 2017-01-09 20:22:33,842:INFO:certbot.renewal:Cert not yet due for renewal 2017-01-09 20:22:33,848:INFO:certbot.renewal:Cert not yet due for renewal 2017-01-09 20:22:33,853:INFO:certbot.renewal:Cert not yet due for renewal 2017-01-09 20:22:33,859:INFO:certbot.renewal:Cert not yet due for renewal 2017-01-09 20:22:33,864:INFO:certbot.renewal:Cert not yet due for renewal 2017-01-09 20:22:33,870:INFO:certbot.renewal:Cert not yet due for renewal 2017-01-09 20:22:33,870:DEBUG:certbot.renewal:no renewal failures 2017-01-09 20:22:33,870:INFO:certbot.hooks:No renewals attempted, so not running post-hook
If the cert isn't up for renewal it will just run and exit without doing anything. For testing purposes change the command in the script tohow can i check if the renewal process is working??????????
certbot renew --dry-run
and it will output the results in the terminal window.