0

Im compile Nginx from source with 3rd party modules. Remove old Nginx and make install new compiled. All fine, but when you remove old Nginx, certbot script automaticaly will be removed.

After Nginx compilation and install. When attempt to install nginx certbot by command "sudo apt install python3-certbot-nginx". It try to install Nginx from repository with certbot. Help me resolve this.

How setup certbot on compiled Nginx without dependency to install Nginx from repository?

2 Answers 2

0

Why not go with the DNS verification route for this?
Install Certbot on Ubuntu

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot

Generate certs using DNS verification -
sudo certbot certonly --manual --preferred-challenges dns

1
  • Im already have generated SSL certificates. Im need automatic update sertificates for existing domains. Just in one moment i need 3rd party module, as a result use compiled from source Nginx instead installed from repository. Before - "python-certbot" script do all work. Is it possible to make automatic renew via - "certbot"? Possible with cron?
    – Aleksey
    Apr 27, 2019 at 13:01
0

Thank to Ritesh for direction, but DNS verification need additional configure. Make some googling, and solve this.

To successfully update SSL certificates on the Nginx server compiled from source, when certificates already exist, from a previous version of python-certbot.

Install the regular, non-python version of the certbot script.

sudo add-apt-repository ppa:certbot/certbot

sudo apt-get update

sudo apt-get install certbot

Create shell script:

touch /etc/nginx/SSLrenewNginx.sh

echo "------------------------------*********------------------------------" >> /etc/nginx/sslrenew.log date "+%H:%M:%S %d/%m/%y" >> /etc/nginx/sslrenew.log sudo certbot renew >> /etc/nginx/sslrenew.log

Run crontab editor:

crontab -e

And add row (for example to renew certificates ones at 3 month)

1 4 10 */3 * /etc/nginx/SSLrenewNginx.sh

Complete!

*If you renew certificates more often then once per 90 days, its not cause any problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .