Virtualmin LetsEncrypt path doesn't match DocumentRoot

I've gotten the LetsEncrypt module to work on multiple other virtualhosts, but since this one uses a non-default DocumentRoot. The acme-challenge fails to download.

How do i get LetsEncrypt module to generate the challenge-file in the correct location?

Status: 
Closed (fixed)

Comments

How did you change the document root for this domain exactly?

Through Edit directives, as a guy whos used to working without a gui "Edit directives" seemed familiar

I am using one directory for all letsencrypt validation, but i also only use one certificate; which holds all domains of that virutal server. This is a little work to do, but i think its much easier to maintain lateron. You can read more about this here: https://www.virtualmin.com/node/42012

But i will have to update it, reflecting new information.

Try instead changing the home dir on the Website Options page (on the left menu). This way, Virtualmin will know what the correct home directory is.

That changes the directory as expected but its relative to /home/[username]/domains/[virtualhost-name], and it does not allow an absolute path or symbolic links. I need it to be /home/[username]/apps/[git-repo-name]/api/web. Because i have multiple domains using the same application.

One work-around is as follows :

  1. SSH in as root and get the domain's unique ID with the command virtualmin list-domains --domain example.com --id-only
  2. Edit the file under /etc/webmin/virtual-server/domains with that ID
  3. Change the public_html_path line to the correct directory

Thanks to JamieCameron. That workaround helped me alot. I am using a non-default document root aswell and was facing the same Let's Encrypt certificate requesting issue.

Status: Fixed ยป Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.