Glam Prestige Journal

Bright entertainment trends with youth appeal.

I'm running my Django application on Digital Ocean with Ubuntu 16.04/Nginx/Gunicorn. I issued a (SSL?) certificate by running the following command:

sudo certbot --authenticator webroot --webroot-path /home/user/app --installer nginx -d aaa.com -d 

however I now want to change my domain from aaa.com to bbb.com. How do I keep my certificate for my new domain? When I ran the command to issue the certificate, I assume it created various files such as the directory .well-known - and also added code in my Nginx conf. So do I simply run the same command again, with the new domain in?

sudo certbot --authenticator webroot --webroot-path /home/user/app --installer nginx -d bbb.com -d 

or do I just change the current code and replace it with the new domain? E.g. my Nginx conf looks like this:

ssl_certificate /etc/letsencrypt/live/ #
managed by Ce$
ssl_certificate_key /etc/letsencrypt/live/ # managed by $
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

I've already changed:

server { listen 80; server_name 172.128.67.232 bbb.com location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /home/user/app; }

to my new domain bbb.com.

Advice appreciated.

1 Answer

According to this link, you can re-use your first command line, changing the host names and adding --force-renewal.

Example, for your case : sudo certbot --authenticator webroot --webroot-path /home/user/app --installer nginx -d bbb.com -d --force-renewal

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy