Closed jacy closed 7 years ago
Hi @jacy thanks for writing in! Yup, we have that feature. @timraymond just added that into our 1.2.0-beta1 release here: #814 and #819
The bottom line is that you either use an env var BASE_PATH
or -basepath
CLI options. Base path is a URL path prefix under which all chronograf routes will be mounted.
So, I think you'll want to do --basepath /chronograf
or BASE_PATH=/chronograf
Let me know if it works for you!
Hi @goller Thanks for your reply, my chronograf version is: Chronograf 1.2.0~beta1 (git: 2dbddaf84a03514471ac02d112bf4d63953bdfcf)
I have tried env setting(export BASE_PATH=chronograf) and CLI(/usr/bin/chronograf --host 0.0.0.0 --port 8888 -b /var/lib/chronograf/chronograf-v1.db -c /usr/share/chronograf/canned -basepath chronograf), but it seems not working, did I do it the wrong way?
Hey @jacy, you did it just right. Would you put the chronograf logs into the issue? One thing we'll be able to see from the logs is if it is getting traffic or not.
Also, what URL are you using to get to the server? It should be http://server:8888/chronograf
@goller, after checked the log, it seems -basepath kinda override -b option, and it is now working using --basepath instead, thanks for your help, you saved my day.
Great @jacy, well, we had -basepath
in the README. I've updated it to double dash here: https://github.com/influxdata/chronograf/pull/849
I'm also going to edit what I wrote in this issue to make sure it says double dash so others in the future get the right advice.
@goller Nice, thanks.
I actually now have another problem:
Currently my setting is --basepath chronograf
And front end proxy mapping:
http://proxy.come/chronograf/ -> http://my.chronograf.server.com:8888/
With base path chronograf, the service is able to add the context path "chronograf" in the beginning of every js/css source url, for example:
Githubissues.
I have installed chronograph on my centos machine, and the default setting is applied which listen on localhost and port 8888, i set up a proxy sever to redirect url /chronograf to http://xx.xx.xx:8888, but it is not working as all the links seems using absolute path like 'http://xxxxx/chronograf.css'