NginxProxyManager / NginxProxyManager/nginx-proxy-manager

Deleting a wildcard cert and adding it again results in errors

Open
#4,511 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
If I delete a wild card certificate from the list of ssl certs so that I can recreate it with new dns credentials (because there doesn't appear to be an edit function so that you can update. credentials or change dns hosts) and then create it again you then get errors in the logs like this:

nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-5/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/npm-5/fullchain.pem, r) error:10000080:BIO routines::no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

It appears to be trying to use the same directory for the cert that was there before because it appears to think it still exists somehow.

Nginx Proxy Manager Version
v2.12.3

To Reproduce
Steps to reproduce the behavior:

  1. Go to SSL Certificates
  2. Delete an existing wildcard cert.
  3. Create the same wildcard cert again, but change the dns challenge credentials
  4. See error

Expected behavior
Should create a new entry or recreate the folders etc. properly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue from the SSL Certificates flow with the nginx-proxy-manager:latest Docker image, deleting a wildcard certificate and creating it again with different DNS credentials. Inspect the resulting logs and certificate paths; done means the recreated certificate no longer references the deleted /etc/letsencrypt/live/npm-5 directory and nginx configuration validation succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx, typescript
Domain
backend, infrastructure, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.