Try the fastest and simplest way to install ONLYOFFICE

Doc server behind Apache proxypass websockets issue

Questions/problems on Docker

Doc server behind Apache proxypass websockets issue

Postby hfw » Wed Aug 02, 2017 8:04 am


My setup:

Server A
Public IP A
CentOS 6 (latest) with Nextcloud 12.0.0 and latest OO connector with correct URL to Server B
Letsencrypt certificates
Apache virtual domain domain -> Server B:8443

Server B
Public IP B
Centos 7 (latest) with docker
Document server (latest) for docker according install instructions and generated self signed certificates
Container pulled and started with docker run -i -t -d --name onlyoffice -p 8443:443
Test page shows Document server is running

Now when I click a document, Document server shows up and the spinner with loading is showing. After a while I get either 'can not download' or 'can not be saved'.

After looking at logs and dev consoles of various browsers, it always shows 'Websocket connection failed to wss://....' (URL1) and 'failed: Error during WebSocket handshake: Unexpected response code: 400'

When trying to access URL1 but with https instead of wss the page shows an nginx error (doc server docker server B) '400 Bad Request
The plain HTTP request was sent to HTTPS port'.

The Apache virtual domain on Server A is configured correctly and I have tried many directives regarding proxypass and ws/wss. I have several other applications that us ws with no problem on that same server A.

I would like to debug this and would appreciate some extra pair of eyes and thoughts to get me going. After browsing many google results I'm focussed on a possible clash between letsencrypt certificate (Server A) and self signed certificates (Server B), but I could be completely wrong.

Posts: 2
Joined: Wed Aug 02, 2017 6:42 am

Re: Doc server behind Apache proxypass websockets issue

Postby Maxim » Thu Sep 07, 2017 6:26 am

Hello hfw!
Please add on both servers firewall exception
Code: Select all
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload

You are using CentOS which is high secured OS maybe it doesn't allow requests.
Posts: 1747
Joined: Tue Oct 11, 2016 2:34 pm

Return to Docker Version

Who is online

Users browsing this forum: No registered users and 1 guest