influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Add HTTP proxy base path/prefix configuration option for UI

Open krocans opened this issue 3 years ago • 8 comments

Currently it's impossible to put influxdb UI behind reverse proxy in non-root location. For example nginx configuration like this is not working location /flux/ { proxy_pass http://127.0.0.1:8086/; } Influxdb is always returning root-based URLs in responses eg. <script src="/a35d56ccdc.js"> and that breaks proxy passing.

Please add some config option like http-ui-base-path which "relocates" UI access base URL.

Expected behavior If configuration option is set like http-ui-base-path: 'flux/'.

  • Influxdb returns UI content on request http://127.0.0.1:8086/flux/
  • Probably redirects request '/' to '/flux/'
  • Returns all paths un UI HTMLs prefixed wit this path eg. <script src="/flux/a35d56ccdc.js">

krocans avatar Mar 21 '21 09:03 krocans

This has popped up in a couple of other places as well...linked below for reference:

  • Question asked on the InfluxDB community forums: https://community.influxdata.com/t/nginx-reverse-proxy-with-influxdb2/20689
  • Feature request for a similar option in Kapacitor: https://github.com/influxdata/kapacitor/issues/2478

williamhbaker avatar Jul 09 '21 19:07 williamhbaker

This seems to be a duplicate of https://github.com/influxdata/influxdb/issues/15721.

jluebbe avatar Mar 30 '22 09:03 jluebbe

Is there any way to speed up such a basic feature? Is there any reason why this was not done properly in the first place?

T3rm1 avatar Feb 11 '23 09:02 T3rm1

+1

alv000h avatar Feb 02 '24 10:02 alv000h

+1

regnaio avatar Apr 10 '24 07:04 regnaio

@alexpaxton @121watts @carols10cents @otoolep @e-dard @jwilder @domodwyer @crepererum @alamb @jvshahid

regnaio avatar Apr 10 '24 07:04 regnaio

There's no need to shout.

crepererum avatar Apr 10 '24 08:04 crepererum

+1 We need the base URL to use an Nginx reverse proxy, just like OP

abirmkj avatar May 29 '24 14:05 abirmkj