NCP Reverse proxy header configuration warning and broken config.php

Nextcloud version (eg, 20.0.5): 21.0.4
Operating system and version (eg, Ubuntu 20.04): Raspbian GNU/Linux 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Raspbian)
PHP version (eg, 7.4): 7.3.29-1~deb10u1 (cli)

The issue you are facing:
Nextcloud Overview → Reverse proxy header configuration warning

" Es gibt einige Warnungen bei Deiner Systemkonfiguration.

  • Die Reverse-Proxy-Header-Konfiguration ist fehlerhaft oder Du greifst auf Nextcloud über einen vertrauenswürdigen Proxy zu. Ist dies nicht der Fall, dann besteht ein Sicherheitsproblem, das einem Angreifer erlaubt, die IP-Adresse, die für Nextcloud sichtbar ist, auszuspähen. Weitere Informationen hierzu finden sich in der Dokumentation."

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Use NCP 1.40.4
  2. Update NC to 21.0.4

The output of your Nextcloud log in Admin > Logging:

{"reqId":"yt4mcQsTqxkFiWvApBL3","level":2,"time":"2021-10-08T04:26:05+00:00","remoteAddr":"","user":"--","app":"appstoreFetcher","method":"","url":"--","message":"Could not connect to appstore: cURL error 28: Connection timed out after 60000 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://apps.nextcloud.com/api/v1/apps.json","userAgent":"--","version":"21.0.4.1"}
{"reqId":"YWDYTszjhqLH4PlcpFYIeAAAAI4","level":2,"time":"2021-10-08T23:46:22+00:00","remoteAddr":"138.68.165.154","user":"--","app":"core","method":"GET","url":"/login","message":"Login failed: '8hYTSUFk' (Remote IP: '138.68.165.154')","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0","version":"21.0.4.1"}
{"reqId":"YWLitmPmSjVRBfS1iEBwoAAARhc","level":3,"time":"2021-10-10T12:55:18+00:00","remoteAddr":"46.183.103.8","user":"--","app":"core","method":"DELETE","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_backup.docx","message":"unable to rename, destination directory is not writable : /mnt/hd1/nextcloud/data/files_trashbin/versions","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWLlF2PmSjVRBfS1iEBwpwAAVBs","level":3,"time":"2021-10-10T13:10:28+00:00","remoteAddr":"46.183.103.8","user":"--","app":"no app in context","method":"PUT","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_1.docx","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 2893578 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":114,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":246,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWLlF2PmSjVRBfS1iEBwpwAAVBs","level":3,"time":"2021-10-10T13:10:28+00:00","remoteAddr":"46.183.103.8","user":"--","app":"PHP","method":"PUT","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_1.docx","message":{"Exception":"Error","Message":"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php#691","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132)","/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",691,{"string":"X-Hash-SHA256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":691,"function":"header","args":["X-Hash-SHA256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":195,"function":"header","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["X-Hash-SHA256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"]},{"function":"OCA\\DAV\\Connector\\Sabre\\{closure}","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":71,"function":"call_user_func","args":[{"__class__":"Closure"},"*** sensitive parameter replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":114,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWLlF2PmSjVRBfS1iEBwpwAAVBs","level":3,"time":"2021-10-10T13:10:28+00:00","remoteAddr":"46.183.103.8","user":"--","app":"PHP","method":"PUT","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_1.docx","message":{"Exception":"Error","Message":"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php#691","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132)","/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",691,{"string":"X-Hash-SHA1: da39a3ee5e6b4b0d3255bfef95601890afd80709"}]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":691,"function":"header","args":["X-Hash-SHA1: da39a3ee5e6b4b0d3255bfef95601890afd80709"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":192,"function":"header","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["X-Hash-SHA1: da39a3ee5e6b4b0d3255bfef95601890afd80709"]},{"function":"OCA\\DAV\\Connector\\Sabre\\{closure}","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":71,"function":"call_user_func","args":[{"__class__":"Closure"},"*** sensitive parameter replaced ***"]},{"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","line":96,"function":"fclose","args":[null]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":75,"function":"stream_close","class":"Icewind\\Streams\\Wrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":114,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWLlF2PmSjVRBfS1iEBwpwAAVBs","level":3,"time":"2021-10-10T13:10:28+00:00","remoteAddr":"46.183.103.8","user":"--","app":"PHP","method":"PUT","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_1.docx","message":{"Exception":"Error","Message":"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php#691","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132)","/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",691,{"string":"X-Hash-MD5: d41d8cd98f00b204e9800998ecf8427e"}]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":691,"function":"header","args":["X-Hash-MD5: d41d8cd98f00b204e9800998ecf8427e"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":189,"function":"header","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["X-Hash-MD5: d41d8cd98f00b204e9800998ecf8427e"]},{"function":"OCA\\DAV\\Connector\\Sabre\\{closure}","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":71,"function":"call_user_func","args":[{"__class__":"Closure"},"*** sensitive parameter replaced ***"]},{"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","line":96,"function":"fclose","args":[null]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":75,"function":"stream_close","class":"Icewind\\Streams\\Wrapper","type":"->","args":[]},{"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","line":96,"function":"fclose","args":[null]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":75,"function":"stream_close","class":"Icewind\\Streams\\Wrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":114,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWL79GPmSjVRBfS1iEBwugAATBc","level":3,"time":"2021-10-10T14:43:01+00:00","remoteAddr":"82.113.121.116","user":"--","app":"core","method":"DELETE","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_1.docx","message":"unable to rename, destination directory is not writable : /mnt/hd1/nextcloud/data/files_trashbin/versions","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWM9cC4IcU1ecoKvOVZocAAADwE","level":3,"time":"2021-10-10T19:28:16+00:00","remoteAddr":"217.95.105.194","user":"--","app":"no app in context","method":"PUT","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_ResultsAndAppendix.docx","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 2897153 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 2105344 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["Thesis_20211006_2teRunde_commented_ResultsAndAppendix.docx",null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["Thesis_20211006_2teRunde_commented_ResultsAndAppendix.docx",null,null]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":114,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":246,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWM9cC4IcU1ecoKvOVZocAAADwE","level":3,"time":"2021-10-10T19:28:16+00:00","remoteAddr":"217.95.105.194","user":"--","app":"PHP","method":"PUT","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_ResultsAndAppendix.docx","message":{"Exception":"Error","Message":"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php#691","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132)","/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",691,{"string":"X-Hash-SHA256: 15fef7cd378600556b1b916cccf68e43b0a111aa107342ba2d13b22787f42cd4"}]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":691,"function":"header","args":["X-Hash-SHA256: 15fef7cd378600556b1b916cccf68e43b0a111aa107342ba2d13b22787f42cd4"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":195,"function":"header","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["X-Hash-SHA256: 15fef7cd378600556b1b916cccf68e43b0a111aa107342ba2d13b22787f42cd4"]},{"function":"OCA\\DAV\\Connector\\Sabre\\{closure}","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":71,"function":"call_user_func","args":[{"__class__":"Closure"},"*** sensitive parameter replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":114,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWM9cC4IcU1ecoKvOVZocAAADwE","level":3,"time":"2021-10-10T19:28:16+00:00","remoteAddr":"217.95.105.194","user":"--","app":"PHP","method":"PUT","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_ResultsAndAppendix.docx","message":{"Exception":"Error","Message":"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php#691","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132)","/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",691,{"string":"X-Hash-SHA1: d49fb6a6a6bc8b37f8b9f1ee89611e61e8773b19"}]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":691,"function":"header","args":["X-Hash-SHA1: d49fb6a6a6bc8b37f8b9f1ee89611e61e8773b19"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":192,"function":"header","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["X-Hash-SHA1: d49fb6a6a6bc8b37f8b9f1ee89611e61e8773b19"]},{"function":"OCA\\DAV\\Connector\\Sabre\\{closure}","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":71,"function":"call_user_func","args":[{"__class__":"Closure"},"*** sensitive parameter replaced ***"]},{"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","line":96,"function":"fclose","args":[null]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":75,"function":"stream_close","class":"Icewind\\Streams\\Wrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":114,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}
{"reqId":"YWM9cC4IcU1ecoKvOVZocAAADwE","level":3,"time":"2021-10-10T19:28:16+00:00","remoteAddr":"217.95.105.194","user":"--","app":"PHP","method":"PUT","url":"/public.php/webdav/Thesis_20211006_2teRunde_commented_ResultsAndAppendix.docx","message":{"Exception":"Error","Message":"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php#691","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132)","/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",691,{"string":"X-Hash-MD5: 8ca9481fb21bf0b963d3b21352133452"}]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":691,"function":"header","args":["X-Hash-MD5: 8ca9481fb21bf0b963d3b21352133452"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":189,"function":"header","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["X-Hash-MD5: 8ca9481fb21bf0b963d3b21352133452"]},{"function":"OCA\\DAV\\Connector\\Sabre\\{closure}","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":71,"function":"call_user_func","args":[{"__class__":"Closure"},"*** sensitive parameter replaced ***"]},{"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","line":96,"function":"fclose","args":[null]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":75,"function":"stream_close","class":"Icewind\\Streams\\Wrapper","type":"->","args":[]},{"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","line":96,"function":"fclose","args":[null]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php","line":75,"function":"stream_close","class":"Icewind\\Streams\\Wrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"stream_close","class":"OC\\Files\\Stream\\HashWrapper","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":114,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.4.1"}



The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '*****',
  'secret' => '*******',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    11 => '95.9*****',
    1 => '192.16*****',
    3 => '*****syk.myfritz.net',
    22 => '*****syk.myfritz.net',
  ),
  'datadirectory' => '/mnt/hd1/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '21.0.4.1',
  'overwrite.cli.url' => 'An unhandled exception has been thrown:
RedisException: read error on connection in /var/www/nextcloud/lib/private/RedisFactory.php:94
Stack trace:
#0 /var/www/nextcloud/lib/private/RedisFactory.php(94): Redis->auth(\'3+thdsYUdzF4ig2...\')
#1 /var/www/nextcloud/lib/private/RedisFactory.php(108): OC\\RedisFactory->create()
#2 /var/www/nextcloud/lib/private/Memcache/Redis.php(43): OC\\RedisFactory->getInstance()
#3 /var/www/nextcloud/lib/private/Memcache/Factory.php(115): OC\\Memcache\\Redis->__construct(\'cb320c98d0e0322...\')
#4 /var/www/nextcloud/lib/private/Server.php(1032): OC\\Memcache\\Factory->createLocking(\'lock\')
#5 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\\Server->OC\\{closure}(Object(OC\\Server))
#6 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\\AppFramework\\Utility\\SimpleContainer->OC\\AppFramework\\Utility\\{closure}(Object(Pimple\\Container))
#7 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\\Container->offsetGet(\'OCP\\\\Lock\\\\ILocki...\')
#8 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\\AppFramework\\Utility\\SimpleContainer->query(\'OCP\\\\Lock\\\\ILocki...\', false)
#9 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\\ServerContainer->query(\'OCP\\\\Lock\\\\ILocki...\')
#10 /var/www/nextcloud/lib/private/Server.php(1990): OC\\AppFramework\\Utility\\SimpleContainer->get(\'OCP\\\\Lock\\\\ILocki...\')
#11 /var/www/nextcloud/lib/private/Files/View.php(119): OC\\Server->getLockingProvider()
#12 /var/www/nextcloud/lib/private/Server.php(430): OC\\Files\\View->__construct()
#13 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\\Server->OC\\{closure}(Object(OC\\Server))
#14 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\\AppFramework\\Utility\\SimpleContainer->OC\\AppFramework\\Utility\\{closure}(Object(Pimple\\Container))
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\\Container->offsetGet(\'OC\\\\Files\\\\Node\\\\H...\')
#16 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\\AppFramework\\Utility\\SimpleContainer->query(\'OC\\\\Files\\\\Node\\\\H...\', false)
#17 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\\ServerContainer->query(\'OC\\\\Files\\\\Node\\\\H...\')
#18 /var/www/nextcloud/lib/private/Server.php(1353): OC\\AppFramework\\Utility\\SimpleContainer->get(\'OC\\\\Files\\\\Node\\\\H...\')
#19 /var/www/nextcloud/lib/base.php(588): OC\\Server->boot()
#20 /var/www/nextcloud/lib/base.php(1076): OC::init()
#21 /var/www/nextcloud/console.php(49): require_once(\'/var/www/nextcl...\')
#22 /var/www/nextcloud/occ(11): require_once(\'/var/www/nextcl...\')
#23 {main}://*****syk.myfritz.net/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '*****',
  'dbpassword' => '*****',
  'installed' => true,
  'instanceid' => 'oclaqn5ofjmm',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '******,
  ),
  'tempdirectory' => '/mnt/hd1/nextcloud/data/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
 'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/mnt/hd1/nextcloud/data/nextcloud.log',
  'htaccess.RewriteBase' => '/',
  'theme' => '',
  'loglevel' => '2',
  'app_install_overwrite' =>
  array (
    0 => 'admin_notifications',
  ),
  'simpleSignUpLink.shown' => false,
  'log_type' => 'file',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '*****',
  'mail_smtpport' => '587',
  'mail_smtpname' => '*****',
  'mail_smtppassword' => '****',
  'trusted_proxies' =>
  array (
    11 => '127.0.0.1',
    12 => '::1',
    13 => '***syk.myfritz.net',
    14 => '95.9***',
  ),
);

I found similiar topics in the forum telling me that i should update the trusted proxies, but as you can see, my whole config.php looks broken. maybe there was a problem with the last NCP updates?

Hi & thanks for reporting.
I saw similar output in console once when running nc-update-nc, but it did not end up in my config.php. No idea how that can happen? Maybe @nachoparker can shed some light.

I’d try cleaning up the config, remove all the errors, and add your routers local IP to the trusted proxies array.

Also please provide output of

sudo ncp-report

via txt file or pastebin service

Hello Oliver,

thanks for your support
pastebin: https://pastebin.com/HqKqushV

could you please guide me with cleaning the config.php?

i have removed the errors, added number 15 in trusted proxies and what should i insert to ```
‘overwrite.cli.url’ ?

<?php
$CONFIG = array (
  'passwordsalt' => '*****',
  'secret' => '*******',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    11 => '95.9*****',
    1 => '192.16*****',
    3 => '*****syk.myfritz.net',
    22 => '*****syk.myfritz.net',
  ),
  'datadirectory' => '/mnt/hd1/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '21.0.4.1',
  'overwrite.cli.url' => '???????????????'
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '*****',
  'dbpassword' => '*****',
  'installed' => true,
  'instanceid' => 'oclaqn5ofjmm',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '******,
  ),
  'tempdirectory' => '/mnt/hd1/nextcloud/data/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
 'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/mnt/hd1/nextcloud/data/nextcloud.log',
  'htaccess.RewriteBase' => '/',
  'theme' => '',
  'loglevel' => '2',
  'app_install_overwrite' =>
  array (
    0 => 'admin_notifications',
  ),
  'simpleSignUpLink.shown' => false,
  'log_type' => 'file',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '*****',
  'mail_smtpport' => '587',
  'mail_smtpname' => '*****',
  'mail_smtppassword' => '****',
  'trusted_proxies' =>
  array (
    11 => '127.0.0.1',
    12 => '::1',
    13 => '***syk.myfritz.net',
    14 => '95.9***',
    15 => '?????my router IP??????',
  ),
);

I had the same issue the other day with Redis after updating, I had to re-add www-data as a user in the redis group in the group file.
/etc/group

You edit this using sudo vigr

For overwrite.cli.url I’ve put the URL address to my nextcloud instance.

Maybe the same thing happened for you when updating, can you check your group file?

Hello @ZendaiOwl ,

grafik

i can not see any group folder. my rasperrypi is only running the ncp image, i do not change or install anything else.

The group file is a file not a directory, if you’ve installed nextcloudpi for RPi4, which is based on Raspbian, you have the group file.

Use sudo vigr as mentioned

This is a system file for all the user groups and which users have permissions or access to the user group.

You’re using cd which means “change directory”, it is a file not a directory.

If you want to see it on the terminal cd in to /etc like so cd /etc and then use ls -a

Note if you edit this file without the command I’ve mentioned and you save it with syntax errors or accidentally corrupt it, you will brick it.

sudo vigr is supposed to be used since it has syntax protection from typo’s and save protection from corruption

@ZendaiOwl , thank you!

with “sudo vigr” i found this entry: “redis:x:118:www-data”
is this correct?

There u go :slight_smile:
Yes that is correct, you need to add your user as well there with a comma.

Like so
redis:x:118:www-data,{username}
Or add your user to the www-data user group if it isn’t there

No spaces!
As long as you use vigr it will protect you if you make a mistake :slightly_smiling_face:

Hey,

  1. i have edited vigr from redis:x:118:www-data to redis:x:118:www-data,pi

  2. i have cleaned config.php (remove error, add overwrite.cli.url, add trusted proxie routerIP)


{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "5": "nextcloudpi.local",
            "7": "nextcloudpi",
            "8": "nextcloudpi.lan",
            "11": "95.90.xxxxxx",
            "1": "192.168.xxxxxx",
            "3": "xxxxxxx2syk.myfritz.net",
            "22": "xxxxxxx2syk.myfritz.net"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "21.0.4.1",
        "overwrite.cli.url": "xxxxxxx2syk.myfritz.net",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/mnt\/hd1\/nextcloud\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "logfile": "\/mnt\/hd1\/nextcloud\/data\/nextcloud.log",
        "htaccess.RewriteBase": "\/",
        "theme": "",
        "loglevel": "2",
        "app_install_overwrite": [
            "admin_notifications"
        ],
        "simpleSignUpLink.shown": false,
        "log_type": "file",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": =>
  array (
    11 => '127.0.0.1',
    12 => '::1',
    13 => 'xxxxxxxx2syk.myfritz.net',
    14 => '95.9xxxxxxx',
    15 => '192.168.178.1',
  ),
  1. i have reloaded apache

i can still see the nextcloud warning:
grafik

any more idea?

No unfortunately not about the reverse-proxy error, it seems the Redis error is not occurring for you anymore tho, at least?

I found another post here which resolved their reverse proxy error after using letsencrypt. Maybe this might solve it for you or help you find where the issue is?

If not someone else that have experience this issue will have to help you further :slightly_smiling_face:

i dont know way but in a magical way the nextcloud reverse proxy disappeared

1 Like