[Let's Encrypt] Can't create SSL certificate for mail.domain.tld

2 posts / 0 new
Last post
#1 Thu, 03/30/2017 - 11:17
christianrj

[Let's Encrypt] Can't create SSL certificate for mail.domain.tld

Hi!

I have two domains currently configured in my Virtualmin server. The first one is working correctly including using SSL certificates by Let's Encrypt for domain.tld, www.domain.tld and mail.domain.tld (default options in Virtualmin)

The problem is with the second domain. I can't request the SSL certificate for mail.domain.tld using Let's Encrypt. An error always occur:

Parsing account key...
Parsing CSR...
Registering account...
Already registered!
Verifying mail.domain.tld...
Wrote file to /home/domain/public_html/.well-known/acme-challenge/_DHt5ML5f1KMiZ6vAvj5hVMLI6V2caD2faLgnF3wY2o, but couldn't download http://mail.domain.tld/.well-known/acme-challenge/_DHt5ML5f1KMiZ6vAvj5hVMLI6V2caD2faLgnF3wY2o

It's a 404 error. How is this possible? This worked like a charm without problems for my first domain virtual server.

As a test, I created a "test.txt" file on that location, and tried to access it via browser, and the server throws a "404 error not found".

Virtualmin configured incorrectly my second domain virtual server? How to resolve this?

Thank you!

Fri, 03/31/2017 - 08:46
christianrj

I fixed this problem myself adding "mail.domain.tld":

ServerAlias mail.domain.tld

in the directives for the virtual server (both http and https). This fixed the problem for the second domain, allowing to request a SSL certificate from Let's Encrypt for mail.domain.tld.

Topic locked