-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
server.rewriteBasePath expects a trailing slash #62144
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
@jbudz do you have any idea here? |
@gfarrell I got it to working locally. I haven't used a docker setup but instead a local kibana installation + local nginx. I've used the following configurations: nginx.conf
kibana.yml
Could you try with that setup? |
I think doing this outside of docker probably defeats the point as the bug might be specific to the way the kibana docker images work, or the way it behaves there. Would suggest doing it with a simple docker-compose setup (also because my docker setup is linux, but my main machine is a mac). I can write a basic docker-compose file if that helps you find the bug. |
I have an idea of what might be wrong actually, although I think the documentation is extremely unclear for this. Will investigate. |
@gfarrell let me know about your findings so we can improve the documentation if that is the case 😃 |
This is usually caused by a missing trailing slash, but it's very strange. My understanding is probably limited but what I've seen: Kibana expects a trailing slash on our routes. Browsers will automatically inject this, so it's not a intuitive configuration because nginx won't. With rewriteBasePath localhost:5601/ should be a sufficient target. Without, localhost:5601/(.*)$/ |
The issue was a good 3.5 years ago so I can no longer remember, and I imagine it has been subsequently fixed (I'm no longer using kibana for this). I'll close the issue. |
Kibana version:
7.6.2 (docker)
Elasticsearch version:
N/A
Server OS version:
Browser version:
N/A
Browser OS version:
N/A
Original install method (e.g. download page, yum, from source, etc.):
docker-compose
Describe the bug:
As per SO question:
nginx
reverse-proxy with a base-path to kibana (/kibana
), configuration below. Kibana hasserver.basePath
andserver.rewriteBasePath
are set tokibana
andtrue
(see config below). When accessing my.host.com/kibana I get a JSON-encoded 404 error.nginx.conf:
kibana.yml
This was fixed by adding a rewrite rule for nginx and setting
server.rewriteBasePath
tofalse
:updated nginx.conf rule:
Steps to reproduce:
Expected behavior:
Kibana interface should load normally
Screenshots (if relevant):
N/A
Errors in browser console (if relevant):
N/A
Provide logs and/or server output (if relevant):
kibana logs:
Any additional context:
N/A
The text was updated successfully, but these errors were encountered: