Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change webroot-path of registered letsencrypt cert

I am new with Let's Encrypt certificate. I registered my domain for a nginx server at digitalocean.com following this command

cd /opt/letsencrypt ./letsencrypt-auto certonly -a webroot --webroot-path=/usr/share/nginx/html -d mydomain.com -d www.mydomain.com

and it works fine. Then i have changed my webroot path to /var/www/xxx for my domain. Now when i trying to renew my letsencrypt certificate it's getting error. Then i rollback my webroot path, try again and the renewal works perfectly. Now my question is how can i change my registered webroot-path for Let's Encrypt?

like image 228
Imtiaz Hossain Avatar asked Jun 22 '16 06:06

Imtiaz Hossain


People also ask

Where are the LetsEncrypt Certs stored?

pem files are located in these directories: For Let's Encrypt extension - /usr/local/psa/var/modules/letsencrypt/etc/archive/example.com/ . For SSL It!

What is Webroot path?

The path to a sub domain web root directory, which is directly accessible via HTTP, is typically: /home/username/public_html/subdomain where “username” is the username of your account and “subdomain” is the name of the sub domain itself.


1 Answers

change it in /etc/letsencrypt/renewal/mydomain.conf

set

authenticator = webroot
webroot_path=/var/www/xxx/

and key moment that took me several hours to figure out - configure webrooth path with webroot_path=/var/www/xxx/ not with webroot-path=/var/www/xxx, note the underscore

like image 196
Martins Untals Avatar answered Sep 28 '22 08:09

Martins Untals