Nextcloud activities links shown by local IP address not domain

When i look at the activities (https://domain/apps/activity/), all the uploaded/deleted files are shown by the server local IP: https://x.x.x.x/f/431
How can i fix this? Also this is not only admin account issue, it is the same problem for other users also.

It is a fresh Nextcloud installation 16.0.4 by this tutorial:
https://www.c-rieger.de/nextcloud-installation-guide-ubuntu/

Second issue is, that i get a warning message at the setting overview (/settings/admin/overview)
There are some warnings regarding your setup.

  • 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.

Yes, my NC is published trough Sophos UTM web application proxy, but what sould i change, to fix this?