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 Meteor.absoluteUrl() to handle being deployed on a virtual-host.com/folder/ #335

Closed
ogirardot opened this issue Jul 24, 2015 · 8 comments

Comments

@ogirardot
Copy link

I'm kind of struggling trying to get it working on a server name like that http://my.domain/rocket.chat/
More precisely, these fonts/images are trying to load from / instead of ROOT_URL :

  • /fonts/roboto-regular-webfont.woff2
  • /fonts/roboto-regular-webfont.woff
  • /images/logo/favicon-16x16.png?v=3
  • /fonts/roboto-regular-webfont.ttf

Which is not critical but the FlowRouter does not behave as well making it impossible to use the app :

There is no route for the path: /rocket.chat/

is the error I get, and the meteor-timesync client is trying to use /_timesync too (but I managed to redirect using nginx...).

My set-up is to use the docker container and a nginx reverse proxy.
I'm not exactly sure what to do to fix the client side...

Regards,

Olivier.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@engelgabriel
Copy link
Member

I'll fix it.

@engelgabriel
Copy link
Member

I removed the fonts form the /public folders and started to use it from google fonts api again.

But there are a few places where we have to add Meteor.absoluteUrl() to the beginning of the url.

@ogirardot can you give it a shot and submit a PR with the changes?

@engelgabriel engelgabriel changed the title Client does not handle not being deployed on a virtual-host/top-level domain Use Meteor.absoluteUrl() to handle being deployed on a virtual-host.com/folder/ Jul 25, 2015
@engelgabriel
Copy link
Member

How are you trying to achieve this? With NGINX or Apache?

@ogirardot
Copy link
Author

Nginx

@trogdan
Copy link

trogdan commented Oct 6, 2015

ditto, i too use a virtualhost, but i'm still trying to get past the /_timesync issue. @ogirardot where is _timesync located, or rather, what rule did you use to tell meteor to find it?

@engelgabriel
Copy link
Member

@trogdan it is not a file or directory, it is a registered route on the http server.

@philipphoffmann
Copy link

I think this is related to #1696

@howdoicomputer
Copy link

I don't know how useful these links are but Wekan had the same problem:

wekan/wekan#321
kadirahq/flow-router#329

@engelgabriel engelgabriel modified the milestone: Important Dec 6, 2016
shubhsherl pushed a commit to shubhsherl/Rocket.Chat that referenced this issue Jul 11, 2020
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

7 participants