mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 01:15:51 +03:00
[GH-ISSUE #5322] Upstream iphash #3168
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#3168
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 @CyborgRider on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/5322
Is your feature request related to a problem? Please describe.
"Problem" is that when I want to use load balancing, I'm expected to edit the nginx.conf file, and save it outside of the docker container to make sure the changes aren't overwritten after each upgrade. This then breaks other things.
Describe the solution you'd like
If possible, it would be amazing to have the option to add an upstream ip hash within the NPM web interface that saves to a separate location than the nginx.conf file but can still be referenced in said conf file. This would hopefully allow creating load balancing in a more permanent way without causing future breaks.
Describe alternatives you've considered
I have for essentially my entire time using NPM, used the custom nginx.conf file, though this recently broke due to an upgrade attempted that changed a log file name. I think maybe having a file referenced in nginx.conf under the http {} that allows us to add an upstream ip hash later, have it stored outside the container like most of the custom proxy hosts and ssl certs, then create an interface for load balancing to simplify the creation of these load balances in a tab under the admin web portal inside of settings or somewhere like this, and even adding easy access to select the load balance IP hash in question as a destination for proxy hosts.
Additional context
for reference, this is the only change made to my nginx.conf file:
http { # All of the rest of this section is untouched, so I will only provide the line before and after my change:
proxy_cache_path /var/lib/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;
upstream HighAvailabilityFailover {
ip_hash;
server localIP1:port;
server localIP2:port;
server localIP3:port;
}
include /etc/nginx/conf.d/include/log-proxy.conf;
}
I then call proxy_pass https://HighAvailabilityFailover from my Custom Nginx Configuration to ensure access to whichever server is currently up and running with the least local traffic.
I am not familiar enough to code this myself, but the hope would be, a file could be referenced here that the upstream hash could be added to via settings, to bypass the need for keeping a static nginx.conf. This would help for people who have several servers in a cluster to ensure up-time and high availability fail-over is accessible.