Nextcloud - htaccess not working

I’m still facing this issue, can’t figure out what to do :frowning:

Made the changes mentioned here and it did not solve the issue. In fact, it created another 2 more warnings:

  1. Something about the overwrite URL not being set. It suggested https://192.168… where mine is currently hosted. Updated the php.config file to set the cli overwrite url to the nextcloud instance’s URL and the warning went away.

    • Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/caldav For more details see the documentation :arrow_upper_right:.

No idea how to fix #2 and the .htaccess error is still there.

That said, I can’t access https://{nextcloudurl:nextcloudport}/data so I think it’s a false positive?

#2 is fixed by adding a trailing / to the redir rule.

could you be slightly more specific? I added a trailing / to overwrite.cli.url and that didn’t seem to fix it. chatGPT suggested one of the 4 properties below might be what you’re referring to?

'overwrite.cli.url' => 'https://your-domain.com',
'overwritehost' => 'your-domain.com',
'overwriteprotocol' => 'https',
'overwritewebroot' => '/',

I only have this set though:

'overwrite.cli.url' => 'https://192.168.0.248:9876/',

Inside the webservers config file. Not the nextcloud config.php file

See the htaccess section Frequent Nextcloud 29 (Hub 8) update issues - ℹ️ Support - Nextcloud community

I have edited config.php and in trusted domains, I have left only my FQDN (nextcloud.example.com) which I use through a cloudflare tunnel. Of course, overwrite.cli.url has the same domain as well and looks like this: overwrite.cli.url’ => ‘nextcloud.example.com’.

Red error is gone, only some minor gray are left.
*I can still use my local ip, although I have deleted the entry from config file.

1 Like

Do you mind sharing the config.php file with the changes that you’ve made? Just the parameters that you’ve changed should do it. Thanks.

Although I don’t have it installed any more (I was just testing it for future use), it was like that:

‘trusted_domains’ =>
array (
0 => ‘nextcloud . mydomain . com’, (no spaces, of course)

Trusted_proxies THE SAME as above.

That was the only change I made. The rest discussed here (‘overwrite.cli.url’ => ‘‘nextcloud . mydomain . com’, etc) were already ok from the “Additional variable parameters” I added when installing nextcloud in Truenas, following this video:

I got the same error the first few times I installed Nextcloud (Dragonfish, app), but I found randyisanerd’s tutorial (“Truenas Scale Nextcloud 2.X Install”) on Youtube and it got rid of that error. I’m not sure if it was because of the new user/group he created, the Dataset tree he made, or something entirely different; but I no longer get that error. Though I do get a “Some files have not passed the integrity check.” error in it’s place, but seemed less concerning than my data potentially being exposed or stolen. I’m actually trying to figure out how to get rid of the (and others) errors I have, and finding very little help with. Hope this helps you.