[GH-ISSUE #3840] Better support for error pages #2526

Open
opened 2026-02-26 07:35:54 +03:00 by kerem · 1 comment
Owner

Originally created by @drspangle on GitHub (Jun 29, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3840

Is your feature request related to a problem? Please describe.

Right now, when a server that is being proxied via NPM isn't yet available, a 502 "bad gateway" error is returned. This is fine, it's the expected behavior, but it would be a lot nicer if it were possible to instead redirect to a nicer error page. This would be especially helpful if that page could include javascript to redirect back to the original page after a time, allowing services to come online (obviously this custom page would be written by the end user).

Describe the solution you'd like

I'd like to be able to specify the error pages for handling various errors, in particular 502. You should be able to go into a domain's settings and specify the redirection URL, and/or specify a custom static HTML file to use.

Describe alternatives you've considered

The only real alternative here is to manually edit the nginx config inside the container, which there is lots of documentation to show is possible, but that defeats the purpose of using NPM.

Additional context

Originally created by @drspangle on GitHub (Jun 29, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3840 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **Is your feature request related to a problem? Please describe.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> Right now, when a server that is being proxied via NPM isn't yet available, a 502 "bad gateway" error is returned. This is fine, it's the expected behavior, but it would be a lot nicer if it were possible to instead redirect to a nicer error page. This would be especially helpful if that page could include javascript to redirect back to the original page after a time, allowing services to come online (obviously this custom page would be written by the end user). **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> I'd like to be able to specify the error pages for handling various errors, in particular 502. You should be able to go into a domain's settings and specify the redirection URL, and/or specify a custom static HTML file to use. **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> The only real alternative here is to manually edit the nginx config inside the container, which there is lots of documentation to show is possible, but that defeats the purpose of using NPM. **Additional context** <!-- Add any other context or screenshots about the feature request here. -->
Author
Owner

@github-actions[bot] commented on GitHub (Feb 16, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2661192018 --> @github-actions[bot] commented on GitHub (Feb 16, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2526
No description provided.