New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid using root path on admin UI v2 #5352
Comments
+1 I am trying to run both grafana and influxdb behind a server. We can only listen on port 80. Below is my nginx config:
Using latest code I am not able to get basic UI. My redirect is correct as grafana works just fine. |
I was able to handle both root path issue (for static content) and hard coded API path (always server:port/ping, server:port:query etc) issues via a complicated nginx config shared here. |
@mvadu How were you able to get the admin UI to make query requests back on the same port? |
@ProTip take a look at the nginx config
This basically creates a Boolean which gets set for all requests originated from WebUI (all java scripts, css etc). I then check this in the request processing for default location (as the WebUI defaults to the root, all requests come to this location)
This results in a HTTP 302 redirect responses for these requests with URI changed to /influx/. When browser uses the redirect, it gets processed by the location handler, which passes the request to Influxdb server, and the final response is returned. Long story short, this results in a 2 round trips for each request to InfluxDB via NginX instead of one. Please go through the config file, and you can follow it I suppose. |
Just want to give this issue a thumbs up, I have problems with this as well as I have a setup where direct access is not possible, and it must go through an existing web proxy (which unfortunately isn't nginx so the above magic solutions won't help). |
I've actually got it to work pretty easy with some hacking. I launched Influx 1.0 through Docker and exposed the proper ports, then used this in Nginx:
The bad part now it that the web admin is reachable on So please, input validation on the port configuration is a good idea, but don't do it before you've exposed the API root path in config 😄 Also I would really like to preconfigure all those config values (host, port, path, credentials) from env variables as they're constants anyway in a Docker Compose setup. |
How was this closed? There are no linked issues so how was this implemented now? |
@curry684 as per latest release notes v1.1 deprecates admin UI itself. Hence @jwilder is pruning all issues related to admin UI. |
Ah ok, I'll just add a quick&dirty dev panel to my own tools then, I found the admin UI pretty useful during development for finetuning queries, as task for which Grafana is just too unwieldy. But in the end it's just a text field and a formatted table anyway. |
Btw this seems to be the issue where its discussed to add a proper way for custom subpathes in InfluxDB2: #15721 |
The is a follow up of #1236 for influxdb 0.9.6.1 because it's asked to open a new one.
I'm testing a simple reverse-proxy config with nginx and influxdb admin on an Arch Linux system.
Relevant nginx configuration is:
Relevant influxdb config
The web admin interface is almost displayed correctly except the database dropdown menu.
But the admin interface use
http://localhost:8086/query?q=SHOW+DATABASES&db=
to execute query instead of $relative/query?....We seems to be close to have this to work.
The text was updated successfully, but these errors were encountered: