This thread has helped me a couple of times. Since upgrading to Nextcloud 29 a bunch of things are broken (again) and my fixes aren't working. Any help is welcome. Errors/warnings:
Your "trusted_proxies" setting is not correctly set, it should be an array of IP addresses - optionally with range in CIDR notation. For more details see the documentation ↗.
Current setting in config.php:
'trusted_proxies' =>
array (
0 => '46.165.217.151',
1 => '209.58.146.193',
2 => '209.58.138.136',
),
I tried just 0 => 'opal15.opalstack.com' first, but that also didn't make the error disappear. The IP addresses above are for opal15, imap1.us, and mail1.us, which are a stretch (I didn't know if I now needed multiple trusted proxies...) Not sure where to go from here.
The PHP memory limit is below the recommended value of 512 MB.
Here's my .user.ini file in the root directory of the Nextcloud app, right now:
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
output_buffering=0
memory_limit=512M
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
The last 2 lines are suggestions from other (also new) warnings. The settings in .user.ini seem to have no effect (I've tried memory_limit = 512M, 1024M, and 1G); Nextcloud admin view still shows memory_limit=128M.
Some headers are not set correctly on your instance - The Strict-Transport-Security
HTTP header is not set (should be at least 15552000
seconds). For enhanced security, it is recommended to enable HSTS.
.htaccess in the root of the Nextcloud app directory includes this:
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
I also tried it under <IfModule mod_env.c> (because I'm not 100% sure where it goes). No effect so far.
Then a bunch of other warnings, like
The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster. Missing optional index "dav_shares_resourceid_type" in table "dav_shares". Missing optional index "dav_shares_resourceid_access" in table "dav_shares". Missing optional index "oc_npushhash_di" in table "notifications_pushhash". Missing optional index "schedulobj_lastmodified_idx" in table "schedulingobjects".
I used the occ-web app (because I can't run occ commands on shared hosting) and ran the command suggested above. There was no feedback except lines that seemed to note the command had run (I rand it later and there was no feedback at all, so i assume the command ran the first time). Nevertheless, this error persists.
The app is type "Apache/PHP-FPM" so maybe .user.ini, .htaccess, etc. don't work for that setup? Not sure. In any case, Nextcloud is broken (i.e., refuses to sync or authenticate the desktop app) and my tech-ignorant ass can't fix it. If you have any suggestions, they would be very useful to me.