Onllyoffice + nextcloud - forward http requests

Issues during installation, usage and configuring
Post Reply
Bekon
Posts: 2
Joined: Mon Mar 11, 2019 1:32 pm

Onllyoffice + nextcloud - forward http requests

Post by Bekon » Mon Mar 11, 2019 1:59 pm

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?

Maxim
Posts: 1847
Joined: Tue Oct 11, 2016 2:34 pm

Re: Onllyoffice + nextcloud - forward http requests

Post by Maxim » Thu Mar 14, 2019 1:33 pm

Hello!
ONLYOFFICE Document Server example configurations for proxy see here

Bekon
Posts: 2
Joined: Mon Mar 11, 2019 1:32 pm

Re: Onllyoffice + nextcloud - forward http requests

Post by Bekon » Tue Mar 19, 2019 3:59 am

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.

Post Reply