Page 1 of 1

Onllyoffice + nextcloud - forward http requests

Posted: Mon Mar 11, 2019 1:59 pm
by Bekon
Hi,

Yesterday i switched from collabora to onlyoffice and i'm impressed, it looks and work very nice.

Below is my configuration:

Server:1 - Reverseproxy (front) - configuration for apache: https://github.com/ONLYOFFICE/document- ... -http.conf
Server:2 - Nextcloud (backend) - domain: https://cloud.domain.com
Server:3 - Onlyoffice (backend) - domain: https://office.domain.com

All traffic is always handled by reverseproxy (nextcloud <> onlyoffice). My configuration for onlyoffice in nextcloud app is:
Document Editing Service address: https://office.domain.com
Document Editing Service address for internal requests from the server: https://office.domain.com
Server address for internal requests from the Document Editing Service: https://cloud.domain.com

Here is my question:

Is it possible to redirect https request from office.domain.com to cloud.domain.com? Now when i visit office.domain.com i see: Document Server is running (page from only office server). I would like to forward traffic to cloud server, just for "esthetic" reasons and show users which query office.domain.com nextcloud webpage instead of Document Server is running.
When reverseproxy is set to:
ProxyPass / "http://cloud server addr/"
ProxyPassReverse / "http://cloud server addr/"
Onlyoffice is unavailable.
Is it possible? How should looks reverseproxy configuration?

Re: Onllyoffice + nextcloud - forward http requests

Posted: Thu Mar 14, 2019 1:33 pm
by Maxim
Hello!
ONLYOFFICE Document Server example configurations for proxy see here

Re: Onllyoffice + nextcloud - forward http requests

Posted: Tue Mar 19, 2019 3:59 am
by Bekon
Hi,
I figured it out before your answer. Link on github (with proxy configuration) does not solved my problem.
Here is my configuration:

Code: Select all

ProxyPassMatch (.*)(\/websocket)$ "ws://ip_addr_onlyoffice/$1$2"

ProxyPassmatch ^(\/v[\d]+\.[\d]+\.[\d]+[\.|-][\d].*)$ "http://ip_addr_onlyoffice/$1"

ProxyPass /cache "http://ip_addr_onlyoffice/cache"
ProxyPassReverse /cache "http://ip_addr_onlyoffice/cache"

ProxyPass /web-apps "http://ip_addr_onlyoffice/web-apps"
ProxyPassReverse /web-apps "http://ip_addr_onlyoffice/web-apps"

ProxyPassMatch (.*)$ "http://ip_addr_nextcloud"
Matches only necessary destination path and forward to onlyoffice server, all other is forwarded to nextcloud. Its not perfect but it works.