mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #2085] NPM tries to handle requests interally for /.well-known/acme-challenge/* and responds with 404 #1501
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1501
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @lriley2020 on GitHub (May 31, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2085
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
I am running a Mailcow server behind NPM and need to get Letsencrypt certificates for it. Every time a request is made to mailserver.mydomain.com/.well-known/acme-challenge/[acme-challenge-here], NPM responds with a 404 error.
I have tried
curl -H "Host: mailserver.mydomain.com" http://[serverIP]:8080/.well-known/acme-challenge/testand it works fine, but when I trycurl mailserver.mydomain.com/.well-known/acme-challenge/test, I get the response of:I can also see this in the NPM logs:
This seems to suggest that maybe NPM is looking for this file locally instead of actually passing the request to my server?
Nginx Proxy Manager Version
v.9.18
Operating System
Ubuntu Server 20.04
@the1ts commented on GitHub (May 31, 2022):
What you describe is exactly the job of NPM. Its the proxy that creates, renews, uses and holds the certs for the services behind it. To do that it captures the calls to the /.well-known/acme-challenge/.
What may be useful for you to know is the /data/letsencrypt directory on the host holds the certs and keys, so it can be shared between NPM and other containers that need those certs. Leaving NPM to update the certs and other containers to simply use them. For instance, I use the NPM created wildcard cert for email services by pointing exim and dovecot at the NPM certs.
If you need permission changes, other container restarts etc letsencrypt has the ability to run scripts, see the renewal-hooks directory.
@lriley2020 commented on GitHub (May 31, 2022):
Hi, thanks so much for your advice - I was just thinking about something like that now! It seems like someone else seems to have had my exact same problem in #779, so sorry for not looking throroughly enough! I'll try adding a renewal hook later and close this for now
@mxtthiasss commented on GitHub (May 25, 2023):
Hi,
is it just possible to send .well-know part to mailcow?
@lriley2020 commented on GitHub (May 25, 2023):
There will probably be a way, but I decided not to go down that route because I still want NPM to handle the ACME requests for my other certificates for other services. In the end, it wasn't that hard to just make a posthook script that copies the new certificate from NPM to mailcow when it gets renewed (see #779).