Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

Feature Request: Add subdirectory support for single domain setup #60

Open
bcm0 opened this issue Jan 31, 2019 · 4 comments
Open

Feature Request: Add subdirectory support for single domain setup #60

bcm0 opened this issue Jan 31, 2019 · 4 comments

Comments

@bcm0
Copy link

bcm0 commented Jan 31, 2019

Just wanted to know why users need a subdomain or a second domain for the Collabora Online server to work.

For example cloud.nextcloud.com is the Nextcloud home and Collabora should be served at cloud.nextcloud.com/office instead of office.nextcloud.com
I tried a subdirectory setup by changing loolwsd.xml

  • file_server_root_path: office/loleaflet/../
  • service_root: /office

but it didn't work.
I get 404 because file_server_root_path seems to have no effect.

Thank you for reading.

@fowlerovski
Copy link

bump

@kaktuspalme
Copy link

kaktuspalme commented Sep 15, 2020

I just added those lines from the documentation to my nextcloud virtualhost config in apache 2:

ProxyPreserveHost On

ProxyPass           /loleaflet https://127.0.0.1:9980/loleaflet retry=0
ProxyPassReverse    /loleaflet https://127.0.0.1:9980/loleaflet

ProxyPass           /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
ProxyPassReverse    /hosting/discovery https://127.0.0.1:9980/hosting/discovery

ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon

ProxyPass   /lool/adminws wss://127.0.0.1:9980/lool/adminws

ProxyPass           /lool https://127.0.0.1:9980/lool
ProxyPassReverse    /lool https://127.0.0.1:9980/lool

ProxyPass           /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse    /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities

For nginx it's probably similiar. In my case it works this way on the same domain as my nextcloud.

@r2evans
Copy link

r2evans commented Sep 17, 2020

@kaktuspalme this looks as if you have are sharing the root directory of the web server between CODE and nextcloud, meaning that (for instance)

https://example.com/apps/files           --> nextcloud
https://example.com/lool/.*/ws           --> code
https://example.com/settings/user        --> nextcloud
https://example.com/hosting/capabilities --> code

This doesn't seem like it's running CODE in a sub-dir, just banking on the current state that nextcloud and CODE don't use the same top-level directories/end-points. Is that right?

(I'm not knocking the premise, it seems legit, though I'm curious what issues could arise, either within nextcloud or CODE (conflicts) or performance issues in the rev-proxy (whether apache2, nginx, or traefik or similar). Thanks!

@kaktuspalme
Copy link

@r2evans Yes all ProxyPass paths are served from code within docker and all other paths are served from nextcloud. If one of the code paths would be served from nextcloud you couldn't reach that nextcloud path. So it only works as long as you don't have mutual paths.

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

No branches or pull requests

4 participants