Let's Encrypt: nextcloud on a virtual host not working

Strange. Normally there’s something in there excluding the Let’s Encrypt validation files from the https redirect, but I’m not seeing it here. Try replacing the Redirect line (line 11 in what you posted) with one like this:

  RedirectMatch 301 ^(?!/\.well-known/acme-challenge/).* https://nextcloud.yourdomain

Then reload Apache with systemctl reload httpd, and try again.

@dev_team, what do you think? This looks like a bug to me.

Thank you. this exactly was it. Workes now as it should.

As pointed out in your other topic (Nextcloud not working - Service Unavailable), the reason that was it was because you have a custom template fragment that omits that line–it’s there in the default templates. Removing that template fragment should be a permanent fix to both this issue and the issue in the other topic.

3 Likes