How does Prometheus correctly run behind a reverse proxy without configuration? #16937
Unanswered
fabiorossetto
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I want to run Prometheus on a subpath, using a reverse proxy. That is when a client requests
http://mydomain/foo/query
, this is routed to127.0.0.1:9090/query
by the reverse proxy.I am aware of the
--web.external-url
. However, surprisingly, Prometheus works out of the box without setting that flag.I have NGINX configured like this
When I access
http://mydomain/foo/query
, all the links in the page are not to e.g./alerts
but/foo/alerts
.How could Prometheus know how to adjust the URLs? The request from NGINX to Prometheus does not contain any special header like
X-Forwarded-Prefix
Beta Was this translation helpful? Give feedback.
All reactions