onlyoffice-owncloud
onlyoffice-owncloud copied to clipboard
Owncloud-Onlyoffice Docker behind NGINX reverse proxy connection issues
I have Owncloud 10 and OnlyOffice Documentserver running in containers with a NGINX reverse proxy. I'm getting errors when I configure the connector in Owncloud. I did wget from the Owncloud server to the Document server with no issues but when I wget from the Document server to Owncloud it tests the connection via https which succeeds and then tries to download via http which obviously isn't going to work. I think the issue is with my proxy.config but I've hit a wall. I've tried a slew of different config lines from more forums than I can count to no avail. I have connection to both servers by their FQDN from an external machine. I stripped the config file down to bare minimum that still works from an external machine and posted it below. Any guidance would be appreciated.
upstream owncloud-server {
server 172.17.0.1:8080;
}
upstream document-server {
server 172.17.0.1:81;
}
server {
listen 443 ssl http2;
ssl_certificate /etc/nginx/conf.d/cert.pem;
ssl_certificate_key /etc/nginx/conf.d/key.pem;
client_max_body_size 512M;
location / {
proxy_pass http://owncloud-server;
}
}
server {
listen 8443 ssl http2;
server_tokens off;
ssl_certificate /etc/nginx/conf.d/cert.pem;
ssl_certificate_key /etc/nginx/conf.d/key.pem;
location / {
proxy_pass http://document-server;
}
}
The problem can be solved by adding x_forwarded_host and x_forwarded_proto headers. Here you can find additional information about using Document Server behind a proxy. Examples for different web servers Example of the config that we use in NGINX+OC+DS (docker compose)
Help me !!! I tried many ways but failed :(( https://github.com/BeShin/ownCloud-ONLYOFFICE-integration/issues/1
Hello @BeShin Please make sure both servers can reach each other via https:
- Run
wget https://documentserver_address
on Owncloud machine. - Run
wget https://owncloud_address
on Document Server machine.
Also please note that neither Document Server nor Owncloud is able to verify self-signed certificates. We strongly recommend to use CA-signed certificates. For instance, you can obtain trusted certs from Let's Encrypt for free.
Thank you to help me. I know my problem and have fixed it. It is not problem of self-signed certificates. There are a few problems when installing the onlyoffice server. I have reinstalled and run fine :)
Thank you to help me. I know my problem and have fixed it. It is not problem of self-signed certificates. There are a few problems when installing the onlyoffice server. I have reinstalled and run fine :) Can you post step-by-step or config files?