NginxProxyManager / NginxProxyManager/nginx-proxy-manager

Custom error pages not working

Open
#4,028 3 comments 0 reactions 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
Whenever I add the server_proxy.conf file to /data/custom and fill it with my desired configurations:

...
error_page 505 /error_pages/505.html;

location /error_pages {
    alias /data/nginx/error_pages;
    internal;
}

It doesn't actually use it, the permissions have been check and since it works on my test nginx instance I am assuming something isn't right with NPM.

However, if added in the proxy under the advanced section, it will function.

Nginx Proxy Manager Version
v2.11.3

To Reproduce
Steps to reproduce the behavior:

  1. create the server_proxy.conf in /data/custom
  2. Enter the error page location like above
  3. Go to a subdomain configured with NPM
  4. the page will report the default 502 bad gateway with openresty instead the custom html file

Expected behavior
See the custom html file instead openresty default error page

Screenshots
{8917B66A-89BA-4AF3-A389-22834FEB8101}

Operating System

Additional context
Firefox 130.0.1 (64-bit)

Client: Docker Engine - Community
Version: 27.1.2
API version: 1.46
Go version: go1.21.13
Git commit: d01f264
Built: Mon Aug 12 11:50:12 2024
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 27.1.2
API version: 1.46 (minimum version 1.24)
Go version: go1.21.13
Git commit: f9522e5
Built: Mon Aug 12 11:50:12 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.20
GitCommit: 8fc6bcff51318944179630522a095cc9dbf9f353
runc:
Version: 1.1.13
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0

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 with the reported /data/custom/server_proxy.conf and the /data/nginx/error_pages path, then reproduce the behavior using the listed steps and Nginx Proxy Manager v2.11.3. Compare the custom configuration with the configuration entered in a proxy's advanced section. Done means the configured 505 or 502 custom HTML page is served instead of the default OpenResty error page.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.