ONLYOFFICE / onlyoffice-nextcloud

The app which enables the users to edit office documents from Nextcloud using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Nextcloud
GNU Affero General Public License v3.0
551 stars 157 forks source link

dont accept custom port format (ex: "http://onlyoffice.my-domain.com:9999") #446

Open quejoo opened 3 years ago

quejoo commented 3 years ago

changing port from 443 to custom one dont work as expected. cURL error 7 is displayed informing connection refused on port 443 when it should use custom port provided

solracsf commented 2 years ago

Confirmed also when setting internal server address on custom port like http://127.0.0.1:88/onlyoffice-ce/:

(cURL error 7: Failed to connect to 127.0.0.1 port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
for http://127.0.0.1/onlyoffice-ce/cache/files/conv_check_976148663_docx/output.docx/check_976148663.docx?md5=hBfbyRWrkIz9MRzelbz7JQ&expires=1649842572&filename=check_976148663.docx) (version 7.0.1.37)
SergeyKorneyev commented 2 years ago

Hi @quejoo and @solracsf

Are you using a custom webserver or reverse proxy configuration? It's possible that you're missing the X-Forwarded-Host header, since the link to the file in Document Server cache seems to be formed using the default port.

quejoo commented 2 years ago

Hi @quejoo and @solracsf

Are you using a custom webserver or reverse proxy configuration? It's possible that you're missing the X-Forwarded-Host header, since the link to the file in Document Server cache seems to be formed using the default port.

that seems to be the case but i dont know how to fix this. After reading some similar reports i found some instructions to add this: proxy_set_header X-Forwarded-Host $http_host;

Im using nginx proxy manager and the custom port for reverse proxy is 8443 and the internal onlyoffice port is 8082

SergeyKorneyev commented 2 years ago

Hi @quejoo and @solracsf Are you using a custom webserver or reverse proxy configuration? It's possible that you're missing the X-Forwarded-Host header, since the link to the file in Document Server cache seems to be formed using the default port.

that seems to be the case but i dont know how to fix this. After reading some similar reports i found some instructions to add this: proxy_set_header X-Forwarded-Host $http_host;

Im using nginx proxy manager and the custom port for reverse proxy is 8443 and the internal onlyoffice port is 8082

I'm afraid I can't help you with the proxy manager you're using, but you could try setting up or modifying the proxy configuration using our guidelines: https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx.