Links from Nextcloud have wrong adress - e.g. Sharing links, Downloads and PDF Viewer fails - Update to 20.0.10


I have recently sent my NextCloud instance through a series of upgrades.
I have tested my installation before moving on each time, but I am currently facing the following problem (Nextcloud version is 20.0.10 - the problem might have started earlier however).

Our Owncloud runs inside a Windows AD Domain behind a firewall.
It is connected to the outside via a public address through port forwarding.

The problem is the following:
All sharing links the platform now generates are returning the internal address of the Nextcloud machine, not the external public address the Nextcloud is supposed to be accessed through.
An interesting detail is, that direct download of files usually works, while sharing them via links does not. Also, Apps like “PDF Viewer” use the wrong internal address as well.

Where is this configured and how did this configuration change during the update?

Any help is welcome.

For sake of completeness, the Security & setup warnings contain the following messages:

 * PHP configuration option output_buffering must be disabled
 * The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the [documentation](

I am running Nextcloud on FreeBSD and I have a similar problem.
After upgrading to the 20.0.10 version I cannot PDF with one or more spaces in the file name.
For example, if as admin I try to open the “Nextcloud Manual.pdf” I receive the error: PDF.js v2.4.456 (build: 228a591c)
Message: Missing PDF “”.

If I rename the file to Nextcloud_Manual.pdf I can open it.

1 Like

I have solved following the instructions at:
Can't open PDF when filename or folder name contains a space or special character (' ', é, ...) · Issue #381 · nextcloud/files_pdfviewer · GitHub :

  1. Replace the file at apps/files_pdfviewer/js/files_pdfviewer-main.js on your instance with this file from that PR

  2. Clear your (each user must do it) browser’s cache and try to open pdfs. This is a must-do, otherwise, the old file will be loaded from browser’s cache !!

1 Like

thank you so much for the reply!
It seems that my problem has two components: One was the bug with PDF-Viewer you are mentioning.

A second problem was that the Proxy-Configuration in /config/config.php seems to have gotten lost in the upgrade, or alternatively a recent upgrade to the php-Version.

After I added
‘overwritehost’ => ’ ',
to config.php the links started to work.

This is not the end of the story as the warning to “missing reverse proxy header” still persists …