Skip to content
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

Use relative paths instead of absolute #1630

Closed
MiikaJ opened this issue Oct 10, 2014 · 10 comments
Closed

Use relative paths instead of absolute #1630

MiikaJ opened this issue Oct 10, 2014 · 10 comments

Comments

@MiikaJ
Copy link

MiikaJ commented Oct 10, 2014

Kibana 4 only works when serving from the server root, not when trying to serve for example from http://server/kibana.

The src/kibana/index.html has absolute paths instead of relative ones:

<script src="/bower_components/requirejs/require.js?_b=@@buildNum"></script> <script src="/require.config.js?_b=@@buildNum"></script>

The first / should be removed from hrefs.

The main.css has after building:
@font-face {
font-family: 'FontAwesome';
src: url('../../bower_components/font-awesome/fonts/fontawesome-webfont.eot?v=4.2.0');
src: url('../../bower_components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../../bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../../bower_components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../../bower_components/font-awesome/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');

This has one ../ too many.

@rashidkpc rashidkpc changed the title Absolute paths in index.html and incorrect in main.css Use relative paths instead of absolute Oct 10, 2014
@rashidkpc rashidkpc added the help wanted adoptme label Oct 10, 2014
@micaelmalta
Copy link

Hi

I am testing kibana v4.0 and i have some issue

my url is like that http://domain.com/logs/ with nginx as reverse proxy

location /logs/ {
        rewrite ^/logs/(.*) /$1 break;
            proxy_pass http://localhost:5601;
            proxy_set_header Host $host;
            proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_send_timeout 600s;
        proxy_read_timeout 600s;
        }

When i go to my page there is only that in the page

.truncate-by-height { max-height: {{ truncateMaxHeight }}; } .truncate-by-height::before { top: {{ truncateGradientTop }}; }

If i show the source code of the page, the links are wrong:

href="/styles/main.css?_b=3439"
    src="/bower_components/requirejs/require.js?_b=3439"
    src="/require.config.js?_b=3439"

@fredericmohr
Copy link

Got the same problem. This way, kibana4 isn't really usable for many. :(

@marminthibaut
Copy link
Contributor

I'm currently developping a patch for this issue. I'll create a pull request soon.

@bradvido
Copy link

Thanks for fixing this. I've tested as a reverse proxy a '/kibana4' context. The relative paths work great.

@slav
Copy link

slav commented Mar 8, 2015

Just to add to this. Had to modify nginx rules slightly, otherwise path with underscore didn't work:

  location ~* /kb4/.* {
        rewrite ^/kb4/(.*) /$1 break;
            proxy_pass http://127.0.0.1:5601;
            proxy_set_header Host $host;
            proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_send_timeout 600s;
        proxy_read_timeout 600s;
  }

@ghost
Copy link

ghost commented May 13, 2015

Works great - thank you! 😄

@dfr0
Copy link

dfr0 commented Nov 17, 2015

And the configuration for the apache reverse proxy??

thx so much

@gugahoi
Copy link

gugahoi commented Nov 26, 2015

+1 for the apache conf

@faxm0dem
Copy link

👍 for apache

@tamilsweet
Copy link

Please share the config for apache reverse proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests