Kudos at @Moritz_Bunkus
Can URLs with or without a trailing slash treated equally?
For some apps it is a difference if they get called by
Add a file to Apache, e.g.
/etc/apache2/conf-available/app-fix.conf , with the following content:
RedirectMatch ^/<APP>$ /<APP>/
So for example:
RedirectMatch ^/nextcloud$ /nextcloud/
Enable the configuration:
a2enconf app-fix systemctl reload apache2
Then both URLs can be used similarly.