Reverse Proxy Prometheus with Nginx
One option to help secure our Prometheus server is to put it behind a reverse proxy so that we can later add SSL and an Authentication layer over the default unrestricted Prometheus web interface.
We can use Nginx.
CD to the Nginx sites-enabled folder
Create a new Nginx configuration for Prometheus
And copy/paste the example below
1 2 3 4 5 6 7 8 9
Save and test the new configuration has no errors
Test it by visiting again
Visiting your ip address directly will still show the default Nginx welcome page. If you don't want this to happen, then you can delete it's configuration using the command below.