Hi
I have a problem to install and maintain a working SSL certificate for a virtual website that is only a proxy reverse. As it has none root directory setup (not needed for proxy reverse configuration), Let’s Encrypt doesn’t work. Is there a workaround for that ? I’m with Virtualmin GPL.
Here is my NGinx configuration for that virtual server:
why not allow normal root directory public_htm that will allow normal LE to grant a cert then block/configure in the site’s .conf this has worked for my NodeJS reverse proxies.
there may be other ways, though I have not tried them
Unhappy the DNS validation is impossible as DNS is not managed on the Virtualmin/webmin host.
For http/web validation, it looks like it’s impossible with a NGInx web server configured in reverse proxy even with extra options I added to pass-through LE
Have you tried using certbot? Use the temporary web server option to obtain the certificate, to do this you must stop nginx for this to work, then restart nginx after you have added the newly obtained certificate to your nginx configuration restart nginx
Did you use Virtualmin to configure this proxy path, or did you set it up manually?
From your configuration, it looks like everything on port 80 is being redirected to port 443. That won’t work correctly for LE validation process. You need to exclude the .well-known directory from the redirect, e.g.:
manually as I could not find a way to do it through GUI. I have setup an account in Virtualmin for the fqdn so it made the basic nginx config that I edited manually to transform it in a reverse proxy configuration.
Thanks a lot for that,I thought LE just needed to check fqdn points at a website that requests the certificate whatever 80 or 443
So now it looks to work better but I’m facing a new error that looks to be a bug in the certbot version of Debian 12 (although it’s strange as I have other servers in Debian 12 that never got that issue).
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Renewing an existing certificate for mywebsite
An unexpected error occurred:
AttributeError: can't set attribute
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
in logs file it list among first errors fact that I hitted the rate limit due to all failures. So I have deactivated automatic renewal in Virtualmin and will try again in few hours to see how it goes.