Installing SSL Cert from a directory outside of the domain's home directory

6 posts / 0 new
Last post
#1 Fri, 11/11/2016 - 07:20
SialoS

Installing SSL Cert from a directory outside of the domain's home directory

I already have the SSL certificate uploaded on my server and i want to add it to Virtualmin. The problem is that the directory of the certificate, is not in the home directory of the domain but in /etc/letsencrypt/.... How can i add it from the current directory, without copying the certificate in the home directory?

Further explanations just for background.

I was trying to add an SSL cert for my websites and i stumble upon the Letsencrypt free certificates. Researching for that, i saw that my hosting provider in collaboration with Letsencrypt, simplified the procedure of the issuing and updating the cert. (https://help.dreamhost.com/hc/en-us/articles/222168828-Setting-up-Let-s-...) i followed the instructions and created the cert which installed it in /etc/Letsencrypt directory. when i tried to add it on Virtualmin i saw that to be able to accept it, it must be in home directory of the domain. but if i copy the cert, i will break the auto update. (error i received "Failed to install certificate : Certificate file /etc/letsencrypt/live/domain.com/cert.pem must be under the virtual server's home directory")

In the meantime i saw that virtualmin also has auto creation and auto update of the Letsencrypt certs, but i can't use it now because it reports "...request failed. The native Let's Encrypt client was used previously on this system, and must be used for all future certificate request"

I dont know how to undo the procedure i used to issue one in the first place so i decided that the easiest solution is to create something like symlinks, but i cant find how.

Thank you

Fri, 11/11/2016 - 17:19
SialoS

I have created the symbolic link, but its not working. So i will need another way. thanks

Sat, 11/12/2016 - 10:03
SialoS

I found the certbot user Guide (https://certbot.eff.org/docs/using.html#where-are-my-certificates) and i saw that symlink is something that we indeed can use. So, out of curiosity i copied my cert.pem and privkey.pem to home directory (/home/mydomain/) and i got the same error: "Failed to install certificate : Certificate file /home/domainname/cert.pem must be under the virtual server's home directory" so my problem is something else. What can i check? What i might be doing wrong? Thank you

Tue, 12/06/2016 - 03:20
davidforrest

Exact same problem

Wed, 02/13/2019 - 08:22
ncabello

hey! this is what worked for me. I opened the cert and key with nano ando copie each one in the box for paste (instead of puting the directory) after that install and worked (saved my site)

Sat, 02/16/2019 - 14:05
adamjedgar

I thing i have found with virtualmin, not sure if cpanel is the same, if you dont use its interface to do some things, the result is like the left hand not knowing what the right hand is doing/or has done!

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Topic locked