Docker-CODE icon indicating copy to clipboard operation
Docker-CODE copied to clipboard

Feature Request: Add subdirectory support for single domain setup

Open bcm0 opened this issue 6 years ago • 4 comments

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.

bcm0 avatar Jan 31 '19 10:01 bcm0

bump

fowlerovski avatar May 15 '19 19:05 fowlerovski

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.

kaktuspalme avatar Sep 15 '20 16:09 kaktuspalme

@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!

r2evans avatar Sep 17 '20 05:09 r2evans

@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.

kaktuspalme avatar Sep 17 '20 05:09 kaktuspalme