Try the fastest and simplest way to install ONLYOFFICE

Community and Document Server Behind Nginx Reverse Proxy

IIS, Apache

Community and Document Server Behind Nginx Reverse Proxy

Postby randomstranger » Sat Apr 14, 2018 4:29 pm

Info on the setup:

- Two separate CentOS VMs with the lastest Community Server (192.168.1.101) and Document Server (192.168.1.102) set up and working
- One nginx reverse proxy for public access

On LAN, the Document Server's integration into the Community Server works without a problem: Logged into the Community Server, then Settings / Document Service and after entering the internal IPs, the Document Server becomes available through Community Server and I can create and edit documents.

Now, trying to open the document editor when connecting through my public address/domain name doesn't work without modifying the settings under Document Service accordingly - this much is clear to me.

However, as I'm new to nginx as a reverse proxy, I couldn't figure out how to make the document editor available when connecting from the public IP.
I've set up SSL and can connect to both the Community Server and the Document Server individually:

1. Nginx reverse proxy --> Community Server = ok
2. Nginx reverse proxy --> Document Server = ok
3. Nginx reverse proxy --> Community Server (ok) --> Document Server (NOT ok)

As for my proxy setting, it's extremely basic:

location / {
proxy_pass 192.168.1.101; # Community server
include /etc/nginx/proxy_params;
}
with proxy_params containing all the required directives.

What am I missing?

Thx for any help/suggestions
randomstranger
 
Posts: 11
Joined: Sat Apr 14, 2018 4:03 pm

Re: Community and Document Server Behind Nginx Reverse Proxy

Postby randomstranger » Tue Apr 17, 2018 8:08 pm

Update:

I've figured it out in the meantime and should someone end up with a similar problem here's a quick explanation.

So the problem was that I needed to figure out how to set up nginx as a proxy for two separate servers, one for OO Community Server and one for OO Document Server.
The solution: subdomains.

A working nginx proxy conf simply looks like this:

Code: Select all
server {
     server_name mydomain.com;

     location / {
          proxy_pass  "internal-IP-of-OO-community";
          include      proxy_params; # the paramaters required by OO
     }
}

server {
     server_name subdomain.mydomain.com;

     location / {
          proxy_pass  "internal-IP-of-OO-document";
          include      proxy_params; # the paramaters required by OO
     }
}


Cheers
randomstranger
 
Posts: 11
Joined: Sat Apr 14, 2018 4:03 pm

Re: Community and Document Server Behind Nginx Reverse Proxy

Postby Maxim » Thu Apr 19, 2018 11:11 am

Hello!
Great! :D
Maxim
 
Posts: 1694
Joined: Tue Oct 11, 2016 2:34 pm


Return to Web server configuration

Who is online

Users browsing this forum: No registered users and 3 guests