Created
April 18, 2025 14:59
-
-
Save feuerrot/a7942c1c701d16e41bc02a03af4aff5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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