Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions admin_manual/configuration_server/reverse_proxy_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,34 @@ come from the proxy at **10.0.0.1**, which serves Nextcloud as
the remote address matches. This is useful when the same Nextcloud instance is
accessible both with and without a reverse proxy, or when different proxies
serve the instance under different hostnames.

Multiple trusted domains and share link URLs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When multiple entries are listed in ``trusted_domains``, Nextcloud accepts
requests on all of them but generates URLs based on the hostname of each
incoming request. This means share links, download URLs, and notification
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For share link, isn't the URL build when the user copies it from the web UI and not at creation time?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, only the token. On copy it's being assembled iirc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the sentence and paragraph below are false

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, people usually copy them when they create a link and send it to people. Same for mail. Maybe I should rephrase 🤔

I guess I could say "copied" instead of "created" ? Do you think that would be clear enough ?

links will reflect whichever hostname was used at the time they were created.

A share link created while accessing Nextcloud via an internal hostname
(e.g. ``cloud.local``) will contain that hostname and will not be reachable
by users on a different network who only have access to the public hostname
(e.g. ``cloud.example.com``).

To ensure all generated URLs always use a single canonical hostname, set
``overwritehost`` and ``overwrite.cli.url`` unconditionally:

::

<?php
$CONFIG = array (
'trusted_domains' => ['cloud.local', 'cloud.example.com'],
'overwritehost' => 'cloud.example.com',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://cloud.example.com',
);

.. note:: Unlike the ``overwritecondaddr`` pattern above, this applies the
overwrite to every request regardless of origin. Use this when you want
one authoritative public URL for all generated links, even when the instance
is also reachable internally under a different hostname.
Loading