mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
The default nginx config prevents LE from successfully generating a certificate if a manually uploaded certificate is installed #309
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @brunophilipe on 12/8/2023
CloudPanel version(s) affected
2.4.0
Description
The default nginx config redirects all requests to
https://www.*, which is a problem when the installed cert doesn't have the www prefix setup as an alias.I was attempting to redirect traffic from an old server into one managed by CloudPanel, and for that to work I had to first install the existing cert from the old server, redirect DNS traffic, and only then submit a Let's Encrypt request.
However all LE requests would fail validation with a challenge mismatch. I attempted several times until I hit a rate limit.
While waiting for the rate limit, I found this thread on the Let's Encrypt forum, which clarified this problem. Once I rectified my config file to not redirect any
.well-knownrequests (and after waiting for the rate limit time to elapse), my cert creation request succeeded.How to reproduce
www.prefix as an aliasPossible Solution
Change the default nginx config to never redirect
.well-knownrequests to either HTTPS or towww.:Additional Context
As far as I can tell, Let's Encrypt does not cache DNS requests, so this doesn't seem to be a propagation mismatch.