Let's Encrypt Validation failed on FreeBSD

SYSTEM INFORMATION
OS type and version FreeBSD 13.1-RELEASE on amd64
Webmin version 2.000
Virtualmin version 7.1
Related packages Nginx plugin 2.27, Nginx SSL plugin 1.17

I’m trying to get Virtualmin to play nice with FreeBSD running Nginx 1.22.0. When I create an SSL website, the validation from Let’s Encrypt fails with the following message:

.. request failed : DNS-based validation failed : Expected full certificate file /etc/letsencrypt/live/mydomain.com/fullchain.pem was not found

I got it working by modifying line 224 in the file /usr/local/webmin/webmin/letsencrypt-lib.pl from:

if ($out =~ /(\/etc\/letsencrypt\/(?:live|archive)\/[a-zA-Z0-9\.\_\-\/\r\n\* ]*\.pem)/) {

to:

if ($out =~ /((?:\/usr\/local)?\/etc\/letsencrypt\/(?:live|archive)\/[a-zA-Z0-9\.\_\-\/\r\n\* ]*\.pem)/) {

Is there a better way to resolve this without customizing Webmin files?

1 Like

@codealfa,

FreeBSD is considered a “grade b” distro, however bringing this to the attention of @staff should get the matter looked into. It seems like perhaps it’s something that might be able to get placed into the logic of the overall codebase for when the default location it’s looking for stuff fails.

*** Professional, Affordable, Trusted Virtualmin Assistance https://tpnassist.com ***

Thanks for pointing this out - the next release of Webmin will include that fix to work on FreeBSD.

3 Likes

Awesome! Thank you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.