[GH-ISSUE #288] Netdata multiple backends #257

Closed
opened 2026-02-26 06:31:48 +03:00 by kerem · 3 comments
Owner

Originally created by @modem7 on GitHub (Feb 5, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/288

With this particular image, any ideas on how best to transfer my current setup for netdata?

I'm a bit stumped on setting upstreams!

Example from https://docs.netdata.cloud/docs/running-behind-nginx/

upstream backend-server1 {
    server 10.1.1.103:19999;
    keepalive 64;
}
upstream backend-server2 {
    server 10.1.1.104:19999;
    keepalive 64;
}

server {
    listen 80;

    # the virtual host name of this subfolder should be exposed
    #server_name netdata.example.com;

    location ~ /netdata/(?<behost>.*)/(?<ndpath>.*) {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_pass_request_headers on;
        proxy_set_header Connection "keep-alive";
        proxy_store off;
        proxy_pass http://backend-$behost/$ndpath$is_args$args;

        gzip on;
        gzip_proxied any;
        gzip_types *;
    }

    # make sure there is a trailing slash at the browser
    # or the URLs will be wrong
    location ~ /netdata/(?<behost>.*) {
        return 301 /netdata/$behost/;
    }
}
Originally created by @modem7 on GitHub (Feb 5, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/288 With this particular image, any ideas on how best to transfer my current setup for netdata? I'm a bit stumped on setting upstreams! Example from https://docs.netdata.cloud/docs/running-behind-nginx/ ``` upstream backend-server1 { server 10.1.1.103:19999; keepalive 64; } upstream backend-server2 { server 10.1.1.104:19999; keepalive 64; } server { listen 80; # the virtual host name of this subfolder should be exposed #server_name netdata.example.com; location ~ /netdata/(?<behost>.*)/(?<ndpath>.*) { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_pass_request_headers on; proxy_set_header Connection "keep-alive"; proxy_store off; proxy_pass http://backend-$behost/$ndpath$is_args$args; gzip on; gzip_proxied any; gzip_types *; } # make sure there is a trailing slash at the browser # or the URLs will be wrong location ~ /netdata/(?<behost>.*) { return 301 /netdata/$behost/; } } ```
kerem 2026-02-26 06:31:48 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@modem7 commented on GitHub (Feb 5, 2020):

Ah pants, looks like this is pending https://github.com/jc21/nginx-proxy-manager/issues/156

<!-- gh-comment-id:582511989 --> @modem7 commented on GitHub (Feb 5, 2020): Ah pants, looks like this is pending https://github.com/jc21/nginx-proxy-manager/issues/156
Author
Owner

@jc21 commented on GitHub (Feb 7, 2020):

Yeah you'll need upstreams support. You can add those upstreams in an undocumented custom nginx config file, but even then the wildcarded proxy_pass would be an issue..

<!-- gh-comment-id:583241619 --> @jc21 commented on GitHub (Feb 7, 2020): Yeah you'll need upstreams support. You can add those upstreams in an undocumented custom nginx config file, but even then the wildcarded proxy_pass would be an issue..
Author
Owner

@modem7 commented on GitHub (Feb 19, 2020):

Closing pending #156 - no point having duplicate incidents

<!-- gh-comment-id:588401449 --> @modem7 commented on GitHub (Feb 19, 2020): Closing pending #156 - no point having duplicate incidents
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#257
No description provided.