Letsencrypt certificates should include alias and subservers

5 posts / 0 new
Last post
#1 Thu, 01/07/2016 - 18:05
peer.dicken
peer.dicken's picture

Letsencrypt certificates should include alias and subservers

Today I tried to make a letsencrypt SSL certificate with the new release of virtualmin. It's pretty easy and worked very well. But, what I found out was, that the certificate does not include alias and subservers of a server. Also, WWW.domain.tld is not included in the certificate. Will this be fixed, is there any workaround?

Wed, 01/13/2016 - 04:09
X13

I join the questions. Unfortunately there is no information and instructions for letscrypt + webmin + virtualmin + usermin. Will the certificate be renewed automatically? A great new feature, but how can we use it effectively ...

Fri, 01/22/2016 - 06:55
deanski79

Hi guys,

After some research I have found a way to achieve both www.domain.com and domain.com included in letsencrypt requested certificate. I changed following line in /usr/libexec/webmin/webmin/letsencrypt-lib.pl:

my $out = &backquote_command("cd $dir && (echo A | $letsencrypt_cmd certonly -a webroot ".join(" ", map { "-d ".quotemeta($_) } @doms)." --webroot-path ".quotemeta(webroot)." --duplicate --config $temp 2>&1)");

to:

my $out = &backquote_command("cd $dir && (echo A | $letsencrypt_cmd certonly -a webroot -d www.$dom ".join(" ", map { "-d ".quotemeta($_) } @doms)." --webroot-path ".quotemeta(webroot)." --duplicate --config $temp 2>&1)");

It worked like a charm for me. If there is more elegant way to achieve this, please share.

Regards, Dean Iliev

Regards, Dean Iliev

Tue, 01/26/2016 - 15:02 (Reply to #3)
Luppie
Luppie's picture

Thank you for this solution, but there is 1 typo in your line.

my $out = &backquote_command("cd $dir && (echo A | $letsencrypt_cmd certonly -a webroot -d www.$dom ".join(" ", map { "-d ".quotemeta($_) } @doms)." --webroot-path ".quotemeta($webroot)." --duplicate --config $temp 2>&1)");

(Notice the $ before webroot in .quotemeta($webroot) )

Fri, 04/29/2016 - 09:48
porzech

In a new version of virtualmin you can generate letsencrypt certificate for any domains you want. There is an option "Domain names listed here". You do this at the main virtualserver level and you enter all aliases you have. Then certificate is generated for all listed domains.

Topic locked