Joined June 2017
·
Posted to
HTTPS with Certbot for Nginx on Amazon Linux
over 1 year
ago
@pstaight I just had the problem you mention when following the above. I didn't have virtualenv
on my system...but I did have virtualenv-2.7
one quick ln -s /usr/bin/virtualenv-2.7 /usr/bin/virtualenv
later and everything else worked beautifully.
Another thing that might be useful to mention is that since letsencrypt certs are only valid for 90 days we will want to auto renew. I played around with
certbot-auto renew
and it suggested I usecertonly
instead.So I added the following to root's crontab:
* 3 15 * * /usr/local/bin/certbot-auto certonly -n --debug --pre-hook="service nginx stop" --post-hook="service nginx start" --standalone -d my.domain.example.com
--debug
was a requirement for using this on Amazon linux (so certbot-auto told me).-n
runs it non-interactively--pre-hook
and--post-hook
).