Nextcloud-URL without trailing slash

Hi all!

We’re using UCS@school together with the Nextcloud app. Everything works fine except for one point. The Nextcloud sync app (on Windows) shows its URL without a trailing slash, i.e. “https://my.domain.com/nextcloud”. Additionally this behaviour doesn’t change when inputting the server address with a trailing slash while configuring an account to use with the Nextcloud app.

If you then click on this URL you’ll get a 404 from Apache. Only if you append the trailing slash to the URL the Nextcloud website is shown.

What’s the Univention way to amend the UCS Apache config to treat a hit on “/nextcloud” the same as a hit on “/nextcloud/”?

Best regards, Valentin

Hey,

add a file to Apache, e.g. /etc/apache2/conf-available/nextcloud-fix.conf, with the following content:

RedirectMatch ^/nextcloud$ /nextcloud/

Enable the configuration:

a2enconf nextcloud-fix
systemctl reload apache2
2 Likes

Thanks a lot Moritz! That’s such an easy solution I should have thought of myself, I suppose!

BR
Valentin

I tried this and now when I go to the domain assigned to ucs it still goes to the ucs portal and if I click on nextcloud it redirects back to ucs

So I fixed the linking error and I can access nextcloud from ucs but the fix above still does not work, meaning when you go to the domain assigned to ucs it still goes to ucs portal not directly to nextcloud

I guess you want something different compared to the original post.

Orginal post was saying:
http://ex.ample.dom/nextcloud --> 404 error from apache
http://ex.ample.dom/nextcloud/ --> working fine opening Nextcloud

If I got it right you want:
http://ex.ample.dom --> opening Nextcloud

Did I get this right? If so, the above fix obviously will not work as it is something different.

What you will need is to read this article.

/CV

Mastodon