webmin with nginx fails to get Let's Encrypt certificate

When using virtualmin and webmin with nginx the following error occurs when trying to install Let's Encrypt certificate for webmin administration interface via "Webmin -> Webmin -> Webmin Configuration -> SSL Encryption" menu -> "Let's Encrypt". Although adding Let's Encrypt for virtualmin nginx virtual host works at a glance.

Failed to request certificate : No virtual host matching apraft.com was found

Status: 
Active

Comments

You need to request the cert in Virtualmin, by selecting the domain from the left menu and going to Server Configuration -> Manage SSL Certificate -> Let's Encrypt.

You need to request the cert in Virtualmin, by selecting the domain from the left menu and going to Server Configuration -> Manage SSL Certificate -> Let's Encrypt.

Yes, it works well!

But I also want a Let's Encrypt certificate for webmin web interface(which is on 10000 port).

On the Manage SSL Certificate page, there is a button at the bottom to copy the domain's cert to Webmin.