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

RootURL pathprefix not working with reverse proxy; (resource paths not all relative) #2646

Closed
klimkowd opened this issue Mar 25, 2016 · 34 comments
Assignees
Milestone

Comments

@klimkowd
Copy link

I'm hosting my rocket chat on an external server @ https://domain.com/chat

I'm using the default reverse proxy settings as listed in the instructions -- forwarding requests to http://localhost:3000

However, when I attempt to load rocket chat from https://domain.com/chat i only get a 'Unknown path" response. My ROOT_URL=https://domain.com/chat/.

Is there any additional starting paramters that can adjust this. I also noticed that many items like _timesync as well as the sounds and fonts and images are all absolute URLed to '/'

@engelgabriel
Copy link
Member

This depends on #2624

@engelgabriel engelgabriel added this to the 0.25.0 milestone Mar 28, 2016
@engelgabriel engelgabriel modified the milestones: 0.25.0, 0.26.0 Apr 5, 2016
@nobeans
Copy link

nobeans commented Apr 11, 2016

I'm facing the same problem.

The internal value __meteor_runtime_config__.ROOT_URL re-assigned by Rocket.Chat seems wrong.
If you give ROOT_URL=http://my-domain/foo/bar, __meteor_runtime_config__.ROOT_URL should be http://my-domain/foo/bar and __meteor_runtime_config__.ROOT_URL_PATH_PREFIX should be /foo/bar. But currently http://my-domain is set to __meteor_runtime_config__.ROOT_URL.

See https://github.com/meteor/meteor/blob/devel/packages/meteor/url_server.js

@engelgabriel engelgabriel modified the milestones: 0.26.0, 0.27.0 Apr 11, 2016
@nobeans
Copy link

nobeans commented Apr 12, 2016

It works well for me so far, though I'm not sure whether MOBILE_ROOT_URL, MOBILE_DDP_URL, etc. should be changed.
nobeans@25fd753

@nobeans
Copy link

nobeans commented Apr 12, 2016

.sandstorm-credentials, _timesync and tap-i18n/ja.json are still on the wrong root path like http://my-domain/.sandstorm-credentials instead of http://my-domain/foo/bar/.sandstorm-credentials.

This is my workaround using reverse-proxy:

# httpd.conf
ProxyPassMatch (^/.sandstorm-credentials|_timesync|tap-i18n/ja.json) http://my-domain/foo/bar/$1

nobeans pushed a commit to nobeans/Rocket.Chat that referenced this issue Apr 12, 2016
@rodrigok
Copy link
Member

rodrigok commented Apr 18, 2016

@engelgabriel
Copy link
Member

Please reopen the issue if the guide does not work.

@klimkowd
Copy link
Author

I appears the link is dead. Let me know when it's up and i'll give it a try.

On Mon, Apr 18, 2016 at 10:04 AM, Rodrigo Nascimento <
[email protected]> wrote:

@klimkowd https://github.com/klimkowd @nobeans
https://github.com/nobeans can you follow this guide?
https://rocket.chat/docs/master/user-guides-running-in-a-sub-folder


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2646 (comment)

@engelgabriel
Copy link
Member

URL updated

@klimkowd
Copy link
Author

Launching it does "work" now but then promptly setting the site url back
to just the domain under Admin->General doesn't make sense to me. (i set it
for the giggles, and yeah it breaks it again.)

Still fails to load _timesync and .sandstorm as expected.

On Mon, Apr 18, 2016 at 12:50 PM, Gabriel Engel [email protected]
wrote:

URL updated


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2646 (comment)

@engelgabriel
Copy link
Member

this is a restriction on the order the framework initiates, so the settings must be done on the environment variables level in order to loaded in time.

@engelgabriel
Copy link
Member

@rodrigok ideas?

@engelgabriel engelgabriel reopened this Apr 18, 2016
@engelgabriel engelgabriel modified the milestones: 0.28.0, 0.27.0 Apr 18, 2016
@rodrigok
Copy link
Member

rodrigok commented Apr 18, 2016

@klimkowd is everything working if you use the environment variable and keep the Site URL as http://your.domain/path/?

@klimkowd
Copy link
Author

For the most part, yes. except for _timesync and .sandstorm. What are the
impacts with those not working? Also, on a side note. Do you know what
would cause the following problems?

1.) whenever a new message is displayed is causes the whole chat view to
rerender causing a gross flicker.
2.) whenever I click on a users name to private messag them i get rerouted
to https://domain.com/chat/home

On Mon, Apr 18, 2016 at 2:26 PM, Rodrigo Nascimento <
[email protected]> wrote:

@klimkowd https://github.com/klimkowd is everything working if you use
the environment variable and keep the Site URL as `
http://your.domain/path/?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2646 (comment)

@engelgabriel
Copy link
Member

Can you please try the develop branch?

@rodrigok
Copy link
Member

.sandstorm isn't a problem.
_timesync isn't a problem too, but this we should try to fix, it helps to keep messages in correct order.

for 1 and 2, you should try our develop branch or wait the stable release today.

@klimkowd
Copy link
Author

Okay, I migrated to 0.27. Issue 2 resolved but Issue 1 still exists for me.
I also found that when i start to customize and load new assets the links
are not relative for assets

On Mon, Apr 18, 2016 at 2:37 PM, Rodrigo Nascimento <
[email protected]> wrote:

.sandstorm isn't a problem.
_timesync isn't a problem too, but this we should try to fix, it helps to
keep messages in correct order.

for 1 and 2, you should try our develop branch or wait the stable release
today.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2646 (comment)

@klimkowd
Copy link
Author

In addition, emojis are also out of action.

On Tue, Apr 19, 2016 at 10:36 AM, Dan Klimkowski [email protected] wrote:

Okay, I migrated to 0.27. Issue 2 resolved but Issue 1 still exists for me.
I also found that when i start to customize and load new assets the links
are not relative for assets

On Mon, Apr 18, 2016 at 2:37 PM, Rodrigo Nascimento <
[email protected]> wrote:

.sandstorm isn't a problem.
_timesync isn't a problem too, but this we should try to fix, it helps
to keep messages in correct order.

for 1 and 2, you should try our develop branch or wait the stable release
today.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2646 (comment)

@rodrigok
Copy link
Member

The problems with assets was fixed by 6e9a7f7

@rodrigok
Copy link
Member

The problem with emoji was fixed by 7c81e6d

@rodrigok
Copy link
Member

@klimkowd I still can't reproduce the view rerender, can you send us one video?

@klimkowd
Copy link
Author

Here https://i.gyazo.com/504eeaf5976acfb0374540921a834983.gif is a video
of the rerender
I also found another subdirectory link failure: /file-upload

On Tue, Apr 19, 2016 at 9:35 PM, Rodrigo Nascimento <
[email protected]> wrote:

@klimkowd https://github.com/klimkowd I still can't reproduce the view
rerender, can you send us one video?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2646 (comment)

@engelgabriel
Copy link
Member

engelgabriel commented Apr 22, 2016

Can you stop on the frame of the blink?

@engelgabriel
Copy link
Member

engelgabriel commented Apr 22, 2016

image

The problem seems to be that something is generating an invalid date on the client side.. maybe the offset is getting an invalid value and when applied to the date, it generates an invalid date.

@klimkowd
Copy link
Author

Tell me where i can set a break point and i'll let you know.

@engelgabriel
Copy link
Member

@klimkowd do you still see the _timesync error on the console?
@rodrigok how can we test this theory? How can we check the value of _timesync?

@klimkowd
Copy link
Author

yes the _timesync 404s are still present

@engelgabriel
Copy link
Member

So they are definitely related.

@rodrigok
Copy link
Member

@klimkowd can you test the latest develop version? I fixed the timesync problem as you can see here 96f392c and here bac8c78

@engelgabriel
Copy link
Member

Please reopen if the problem persists.

@klimkowd
Copy link
Author

I found another absolute path needing fixed.
/file-upload

On Mon, Apr 25, 2016 at 6:46 PM, Gabriel Engel [email protected]
wrote:

Closed #2646 #2646.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2646 (comment)

@klimkowd
Copy link
Author

Another path problem:
When receiving an invitation to a video chat and clicking "yes"
it sends me to
domain.com/chat/chat/direct/user
instead of:
domain.com/chat/direct/user

@engelgabriel
Copy link
Member

Can you help us with a PR?

@klimkowd
Copy link
Author

Yeah, I'd be happy to help.

On Tue, May 17, 2016 at 6:25 PM, Gabriel Engel [email protected]
wrote:

Can you help us with a PR?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2646 (comment)

@hemanthAppmaker
Copy link

Use docker compose instead of
docker-compose
We use latest version of docker compose

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

No branches or pull requests

5 participants