Try the fastest and simplest way to install ONLYOFFICE

Onlyoffice behind nginx https reverse proxy

IIS, Apache

Onlyoffice behind nginx https reverse proxy

Postby nommaz » Tue Dec 20, 2016 12:52 pm

This is quite similar to the post by fred80.

I am using the Linux install. Have two ubuntu 14.04 LTS machines for document and community servers. In front of them I have an additional nginx reverse proxy because I plan to use one public ip for many sites. I use letsencypt for https on the reverse proxy. My two servers are with default http configuration.

Everything is fine on http. If I use https, the mobile app works but the web app cannot edit documents. I tried all possible combinations of ips and http vs https under Settings->Document Service Location but no luck.
nommaz
 
Posts: 30
Joined: Thu Dec 08, 2016 6:46 am

Re: Onlyoffice behind nginx https reverse proxy

Postby nommaz » Sat Dec 24, 2016 11:36 am

I am very close to getting https work.Need to fix below error on community server /var/log/nginx/error.log:

46.196.16.12 is my browser public ip
163.172.101.23 doc server public ip, 553 is the http public port. community running on 443.

Code: Select all
2016/12/24 11:17:15 [error] 733#733: *691 connect() failed (111: Connection refused) while connecting to upstream, client: 46.196.16.12, server: , request: "GET /cache/files/0So_3aANW0lrf0Oxoxc_/Editor.bin/Editor.bin?md5=Pgp9FYjZt_cuM2bLs3tHCw==&expires=1483183036&disposition=attachment&ooname=output.bin HTTP/1.1", upstream: "https://163.172.101.23:543/cache/files/0So_3aANW0lrf0Oxoxc_/Editor.bin/Editor.bin?md5=Pgp9FYjZt_cuM2bLs3tHCw==&expires=1483183036&disposition=attachment&ooname=output.bin", host: "doc.hugin.co", referrer: "https://doc.hugin.co:543/2016-12-05-17-05/web-apps/apps/documenteditor/main/index.html?_dc=2016-12-05-17-05&lang=en-US&customer=ONLYOFFICE"


something is translating https://doc.hugin.co:543 to https://163.172.101.23:543 and process is failing due to https certificate failure.

strange because i followed the https instruction on onlyoffice site closely. conversion from doc to docx is working, i can also access bmp jpg files from browser, i can access all files from mobile app. just access to docx pdf xlsx.. failing from browser with "unknown error" - above must be the reason.

how can i stop whatever is doing the translation to ip address or get it to skip certificate check?

Thanks!!
nommaz
 
Posts: 30
Joined: Thu Dec 08, 2016 6:46 am

Re: Onlyoffice behind nginx https reverse proxy

Postby nommaz » Sat Dec 24, 2016 12:02 pm

i accessed doc server once via https://163.172.101.23:543 just to get the ssl exception and add the certificate to trusted sites. i was sure this was going to solve my problem.

it didnt, and now the error log is gone. so i am still getting attached error and onlyoffice or nginx doesnt create any logs for me to troubleshoot it. :(
Attachments
Screen Shot 2016-12-24 at 13.45.22.png
Screen Shot 2016-12-24 at 13.45.22.png (25.7 KiB) Viewed 1154 times
nommaz
 
Posts: 30
Joined: Thu Dec 08, 2016 6:46 am

Re: Onlyoffice behind nginx https reverse proxy

Postby Maxim » Mon Dec 26, 2016 10:07 am

Hello!
It's hard to say exactly where the problem is, but i suppose you have problems with routing requests and ports. Pay attention that http://163.172.101.23 doesn't work, it shows "Bad gateway" and it means that 80 port is closed. And remember that there is no longer accept certificate requests for either intranet names or IP addresses, this is an industry-wide standard. That's why https://doc.hugin.co:543/welcome/ works fine and https://163.172.101.23:543 works not correct and shows that the certificate is for different website's address. So, i think that you should install servers again without changing of ports and configure correctly your additional nginx reverse proxy.
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm

Re: Onlyoffice behind nginx https reverse proxy

Postby nommaz » Sat Dec 31, 2016 12:37 pm

Hi Maxim

it was a routing related problem. Its solved now,thanks for pointing me in the right direction.

Vedat
nommaz
 
Posts: 30
Joined: Thu Dec 08, 2016 6:46 am

Re: Onlyoffice behind nginx https reverse proxy

Postby Maxim » Tue Jan 03, 2017 8:17 am

Hello nommaz!
I'm very glad to help you! Feel yourself free to contact us!
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm


Return to Web server configuration

Who is online

Users browsing this forum: No registered users and 2 guests