I am running kibana 4.4.1 on RHEL 7.2
Everything works when the kibana.yml file does not contain the setting server.basePath
. However, when basePath is set to server.basePath: "/kibana4"
all HTTP requests result in 404s. For example http://x.x.x.x:5601/kibana4 results in a 404 and http://x.x.x.x:5601 gets redirected to http://x.x.x.x:5601/kibana4/app/kibana which also results to a 404.
Am I using server.basePath correctly? Why all the 404s?
Here is some more information...
curl http://x.x.x.x:5601/
returns
<script>
var hashRoute = '/kibana4/app/kibana';
var defaultRoute = '/kibana4/app/kibana';
...
</script>
curl http://x.x.x.x:5601/kibana4/app/kibana
returns
{"statusCode":404,"error":"Not Found"}
Why does '/kibana4/app/kibana' return a 404?
Nathan
@nreese this is because the basepath should be removed by the proxy before requests are sent to Kibana. This is generally called "request rewriting" and any number of posts should exist to show you how to set that up for your proxy.
Can you please clarify how this works? I am really stuck and can not find
much help in the documenation
On Mon, Mar 28, 2016 at 2:45 PM, Spencer [email protected] wrote:
@nreese https://github.com/nreese this is because the basepath should
be removed by the proxy before requests are sent to Kibana. This is
generally called "request rewriting" and any number of posts should exist
to show you how to set that up for your proxy.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/elastic/kibana/issues/6665#issuecomment-202574432
Same issue here. And I find this config by nginx could work: https://discuss.elastic.co/t/4-3-0-how-to-configure-your-nginx-balancer-and-apache-reverse-proxy/37351/5
I eventually figured it out and posted an answer to Stack overflow using
HAProxy
http://stackoverflow.com/questions/36266776/kibana-server-basepath-results-in-404.
I did not expect server.basePath to only add the base path to outgoing URLs
and not handle them on incoming traffic as well.
On Tue, Apr 12, 2016 at 8:51 AM, Feng Yu [email protected] wrote:
Same issue here. And I find this config by nginx could work:
https://discuss.elastic.co/t/4-3-0-how-to-configure-your-nginx-balancer-and-apache-reverse-proxy/37351/5—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/elastic/kibana/issues/6665#issuecomment-208945037
Please add sufficient example with server.basepth. Lot of users are struggling because of lack of documentation.
My recommendation would be to re-word the verbiage for the
server.basePath configuration
option in the documentation. The current wording does little to help
explain how kibana uses basePath. My first instincts were to append the
basePath to the URL. This was incorrect and resulted in 404s. Maybe
something like the below would point users in the right direction
Enables you to specify a path to mount Kibana at if you are running behind
a proxy. The basePath value does not change the address that kibana listens
on, instead, your proxy is expected to remove the basePath value before
forwarding requests to Kibana. This setting cannot end in a slash (/).
On Thu, Apr 14, 2016 at 4:19 AM, abhijit [email protected] wrote:
Please add sufficient example with server.basepth. Lot of users are
struggling because of lack of documentation.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/elastic/kibana/issues/6665#issuecomment-209866755
This is ridiculous. Setting the basepath should actually change the basepath for kibana and should not require any reverse proxy rewriting. This kind of behavior is pretty 101 in webapps.
I think there's some confusion here. basePath
exists specifically for people who want to run Kibana behind a proxy. It's not meant to be a useful feature in any other respect. As @nreese said we can probably improve the documentation to make this more clear. I've opened a PR to improve the wording of the docs: https://github.com/elastic/kibana/pull/8375
I'm aware of what basePath is and I'm using it behind a reverse proxy.
I'm objecting to the fact that I have to do url rewrites on the proxy to get this to work.
Me too. I also am aware of what basePath is and I'm using it behind a reverse proxy.
I'm objecting to the fact that I have to do url rewrites on the proxy to get this to work.
Please...
It would probably be trivial for us to support this, but we can't just change the way basePath works at this point. What do you think about https://github.com/elastic/kibana/issues/9522?
I agree, I just stumbled across this same exact issue. creates a lot of extra work for no reason. If you updating the basepath it should change it. Having different URL's makes it difficult to trouble shoot.
I got this working on this system:
[09:39:17] [root@hostname:]# yum list installed | grep kibana
kibana.x86_64 5.5.1-1 @/kibana-5.5.1-x86_64
[09:39:29] [root@hostname:]# yum list installed | grep httpd
httpd24u.x86_64 2.4.27-1.ius.el6 @ius
httpd24u-filesystem.noarch 2.4.27-1.ius.el6 @ius
httpd24u-mod_ldap.x86_64 2.4.27-1.ius.el6 @ius
httpd24u-mod_ssl.x86_64 1:2.4.27-1.ius.el6 @ius
httpd24u-tools.x86_64 2.4.27-1.ius.el6 @ius
[09:39:34] [root@hostname:]# uname -r
2.6.32-696.6.3.el6.x86_64
[09:39:47] [root@hostname:]# cat /etc/redhat-release
CentOS release 6.9 (Final)
[09:39:58] [root@hostname:]#
[09:39:58] [root@hostname:~]# cat /etc/kibana/kibana.yml
server.port: 5601
server.name: Kibana-STG
server.host: 0.0.0.0
kibana.index: .kibana
kibana.defaultAppId: discover
logging.dest: /var/log/kibana/kibana.log
i18n.defaultLocale: "en"elasticsearch.url: http://localhost:9200
[09:42:35] [root@hostname:~]#
ProxyPreserveHost On
ProxyRequests On
ProxyPass / http://localhost:5601/ timeout=200
ProxyPassReverse / http://localhost:5601/
Most helpful comment
Please add sufficient example with server.basepth. Lot of users are struggling because of lack of documentation.