Access to Netdata, Webmin or anything else through a reverse proxy on any configured domain

25 January 2021

Access to Netdata, Webmin or anything else through a reverse proxy on any configured domain

Let's say you are using netdata or webmin or any other app that is using an alternative port to 80, and you want to secure your server a bit more, or perhaps it will be placed behind a very restrictive firewall, then you can use Nginx to forward the traffic from your regular site to the correct app by using folder names for them. So, for example, yoursite.com/netdata/. This is done by using a thing called reverse proxy. It's very powerful and really easy to set up. The only thing you need to know is what port the app is using, and follow the examples below, but just replace the name and port number. If you want to do this for netdata or webmin, you can just copy/paste what you see below.

The first part will go at the very top of your config file for your domain. Let's say you use a domain called example.com, then you need to place this in /etc/nginx/example.com.conf and make sure it goes BEFORE the server { block

upstream webmin {
    server 127.0.0.1:10000;
    keepalive 64;
}
upstream netdata {
    server 127.0.0.1:19999;
    keepalive 64;
}
virtual host config file

In the same config file we now need to jump to the server { block.Inside the server block It doesn't really matter where you paste these lines. I usually place it right below the first /location { block as shown in the screenshot below.

## NETDATA SETUP. Access it by entering /netdata at the end of your domain name. ##
        location = /netdata {
        return 301 /netdata/;
        }
        location ~ /netdata/(?<ndpath>.*) {
        proxy_redirect off;
        proxy_set_header Host $host;
        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://netdata/$ndpath$is_args$args;
        gzip on;
        gzip_proxied any;
        gzip_types *;
        }
## END NETDATA SETUP ##
## WEBMIN SETUP. Access it by entering /webmin at the end of your domain name. ##
        location = /webmin {
        return 301 /webmin/;
        }
        location ~ /webmin/(?<ndpath>.*) {
        proxy_redirect off;
        proxy_set_header Host $host;
        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://webmin/$ndpath$is_args$args;
        gzip on;
        gzip_proxied any;
        gzip_types *;
        }
## END WEBMIN SETUP ##

virtual host config file inside the block: server {

That's all!! Don't forget to do a nginx-t and then restart Nginx with: sudo systemctl restart nginx. Now you can open your web browser and type your domain name and add to the end /netdata. It should now display the netdata page.

Pick a star to rate this
Table of Contents

Leave a Reply

Your email address will not be published. Required fields are marked *

Unrelated Content

26 June 2025
Why Self-Hosting Your Livestream Is Safer, Cheaper, and More Flexible Than Commercial Platforms

With livestreaming more popular than ever, platforms like YouTube Live, Twitch, Vimeo, and Facebook Live have become household names. But are they really the best option for everyone? If you're a tech-savvy creator, a privacy-conscious broadcaster, or someone who just wants full control, self-hosting your own livestream server might be a better choice. In this […]

READ MORE
27 November 2020
Motivation behind this website

For every service that is offered for a lot of money on the internet, there's always a free or much cheaper alternative, especially if you embrace open-source software. For live-streaming this is also very much the case. We love that,

READ MORE
23 January 2021
Introduction to the new how-to article in the Knowledge Base.

I wrote a new guide on setting up your own live-stream server. Mostly due to your requests. I took the opportunity to simplify and shorten the guide a bit. If you follow this guide step by step, and use your brain a tiny bit, you'll be fine. This guide has so far been tested on […]

READ MORE
25 January 2021
Optimizing First-Frame Bitrate for HLS

When responding to an HLS request, the streaming server determines which video quality (i.e., ts file) the client will attempt to play before switching to a lower or higher quality video. This switch depends on available bandwidth and device type. Switching to the wrong quality first degrades the user experience considerably. For instance, sending a […]

READ MORE
25 January 2021
Adaptive Bit-rate Streaming

“What is adaptive streaming?” This question often leads to answers filled with technical terms like “HLS”, “MPEG-DASH”, “segments” and “codec“. This article is written for people who need to understand the principles, but don’t need to actually implement the technology. If you are looking for specific technical information on adaptive streaming then I recommend you read up on it on this website and elsewhere.

READ MORE
2 February 2021
About Bradmax Video Player WordPress plugin

Let's talk about our favorite video player plugin for WordPress. Here are some reasons why Bradmax Player is our favorite. And below that are detailed instructions on how to set it up. Setting it up may at first seem a bit awkward, but it really isn't. First you must obviously install the Bradmax Player plugin […]

READ MORE
Copyright © 2025. 
All rights reserved.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram