Can't reuse letsencrypt certificate in httpd docker

I am trying to reuse a letsencrypt certificate in the official httpd docker container : https://hub.docker.com/_/httpd. In this container the apache folder is located in /usr/local/apache2

I installed the certbot and copied the old certificates, keys and necessary files to /etc/letsencrypt , I have done the instruction written on the official httpd docker page (uncomment lines in conf/httpd.conf in order to activate ssl). When I run certbot -d my-domain-name.com --apache certbot is trying to modify /etc/apache2 which is not the correct location of the apache2 and eventually I get an error and I can't reuse my certificate.

Has anyone had some problem before? Please help.

2 Likes

Welcome to the Let's Encrypt Community :slightly_smiling_face:

Try adding this to your certbot command:
--apache-server-root /usr/local/apache2

You may need to add this too (and possibly other parameters):
--apache-challenge-location /usr/local/apache2

There are a number of parameters available to modify locations and aspects of the certbot apache plugin. You can search the official user guide for "Apache Web Server plugin" to find the list located in the Certbot command-line options section.

2 Likes