Onlyoffice behind reverse proxy won't work (502 Bad Gateway) #711
Replies: 14 comments 2 replies
-
@agolybev could you take a look? |
Beta Was this translation helpful? Give feedback.
-
Hi there, did you ever solve this ? (running into the same issue...) |
Beta Was this translation helpful? Give feedback.
-
"Unfortunately" not. I eventually gave up and switched to collabora. It works like a charme. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your feedback. Damn frustrating... ;-) |
Beta Was this translation helpful? Give feedback.
-
I did experience the same issues here. I did figure out that the issue is not because of the reverse proxy, but because the server does not seem to listen to all IP addresses. I did map my docker-network-IP-Port 8081 to port 80 of the container (172.20.0.3:8081). However, that does only lead to connection refused if I do use wget in the shell to test it. It is working fine with 127.0.0.1:8081, but this address is somehow not reachable via my nginx-reverse-proxy-container on the same server. Maybe someone has an idea here? I did change the env-variable for REDIS_SERVER_HOST to 172.20.0.3 already, but this does not help :-( |
Beta Was this translation helpful? Give feedback.
-
Hi, same problem here. I don't know if the problem come from onlyoffice server (nginx) or nextcloud server. Someone solved it? |
Beta Was this translation helpful? Give feedback.
-
I solved it, i cant belive what it was. It was the default port of onlyoffice server, that is 8000, defined in
EDIT: A way to show document server port, on nextcloud server: sudo -u apache php /var/www/html/nextcloud/occ onlyoffice:documentserver |
Beta Was this translation helpful? Give feedback.
-
i am having the same issue edit just confirmed web browser is using HTTP/2 but wget is using HTTP/1.1 |
Beta Was this translation helpful? Give feedback.
-
how did you solve it? |
Beta Was this translation helpful? Give feedback.
-
@thesorskod you can do this by either mounting the config file and place your own file there (I wouldn't recommend this) or just map the port 8000 to anything you like via Docker. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what update changed things. My nginx-proxy config was working before but now it's required to turn on Websockets Support in nginx-proxy. |
Beta Was this translation helpful? Give feedback.
-
Hello, we have some examples for the reverse proxy settings, we recomend use it https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx |
Beta Was this translation helpful? Give feedback.
-
This doesn't look like an issue, so I'll convert to a discussion. |
Beta Was this translation helpful? Give feedback.
-
turns out for me it was cloudflare.
i remove that rule and solve my issue. |
Beta Was this translation helpful? Give feedback.
-
Do you want to request a feature or report a bug?
It seems like a bug, but mostly I'd just like some help.
My setup
What is the current behavior?
Except onlyoffice everything works like a charm. I got a sub-domain for every outgoing service (wordpress, nextcloud) handled by nginx-proxy. Now I wanted to add the onlyoffice-documentserver to my nextcloud.
I added a block to my docker-compose.yml-file stating
VIRTUAL_HOST=office.my-domain.tld
LETSENCRYPT_HOST=office.my-domain.tld
When I try to connect to onlyoffice in nextcloud it throws
Server error:
GET https://office.my-domain.tld/healthcheck resulted in a 502 Bad Gateway response: <html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>ngin (truncated...)...
What is the expected behavior?
If I'm using purely the docker-compose-block of the onlyoffice/documentserver:latest omitting certificates and using plain HTTP it works perfectly and shows the beautiful page stating "Thank you for choosing ONLYOFFICE! Document Server is running [...]"
But including it into the reverse-proxy-environment results in that 502-Error.
DocumentServer Docker tag:
5.4.2.46
Host Operating System:
Ubuntu 18.04.4 LTS (Bionic Beaver) running docker 19.03.5
Docker-Compose-File Entry
I would prefer to run the documentserver within the single machine hosting everything else over docker. Instead of starting a separate server just for hosting onlyoffice.
Beta Was this translation helpful? Give feedback.
All reactions