Skip to content

Instantly share code, notes, and snippets.

@feuerrot
Created April 18, 2025 14:59
Show Gist options
  • Save feuerrot/a7942c1c701d16e41bc02a03af4aff5f to your computer and use it in GitHub Desktop.
Save feuerrot/a7942c1c701d16e41bc02a03af4aff5f to your computer and use it in GitHub Desktop.
server {
server_name example.org;
root /var/www/;
include snippets/default.conf;
include snippets/acme.conf;
include snippets/tls.conf;
location /metrics {
allow 192.0.2.1;
deny all;
rewrite /metrics/([^/]+)/([^/]+)/([^/]+) $1:$3/metrics break;
proxy_redirect off;
proxy_pass http://$uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment