nextcloud / all-in-one

📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.
https://hub.docker.com/r/nextcloud/all-in-one
GNU Affero General Public License v3.0
5.69k stars 659 forks source link

Blank page with text "File not found" after updating to 4.1.0 #1760

Closed Sid127 closed 1 year ago

Sid127 commented 1 year ago

Steps to reproduce

  1. Update mastercontainer from v4.0.1 to v4.1.0
  2. Attempt to connect to nextcloud

Expected behavior

The nextcloud interface should show up

Actual behavior

A blank white page shows up with the text File not found

Host OS

Arch Linux

Nextcloud AIO version

4.1.0

Current channel

latest

Other valuable info

Nextcloud AIO is running behind an nginx reverse proxy. No files have been changed on the host, only updates done are from the AIO interface.

Backend is not running, as mobile apps and other WebDAV connections fail.

image image

Mastercontainer logs:

Trying to fix docker.sock permissions internally...
Creating docker group internally with id 968
Initial startup of Nextcloud All In One complete!
You should be able to open the Nextcloud AIO Interface now on port 8080 of this server!
E.g. https://internal.ip.of.this.server:8080

If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
https://your-domain-that-points-to-this-server.tld:8443
{"level":"info","ts":1673669423.6923068,"msg":"using provided configuration","config_file":"/Caddyfile","config_adapter":""}
{"level":"warn","ts":1673669423.6935978,"msg":"Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies","adapter":"caddyfile","file":"/Caddyfile","line":2}
{"level":"info","ts":1673669423.694342,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1673669423.6945863,"logger":"http","msg":"automatic HTTP->HTTPS redirects are disabled","server_name":"srv1"}
{"level":"warn","ts":1673669423.694614,"logger":"http","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1673669423.6948009,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0003e90a0"}
{"level":"warn","ts":1673669423.694815,"logger":"tls","msg":"YOUR SERVER MAY BE VULNERABLE TO ABUSE: on-demand TLS is enabled, but no protections are in place","docs":"https://caddyserver.com/docs/automatic-https#on-demand-tls"}
{"level":"info","ts":1673669423.695226,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/mnt/docker-aio-config/caddy/"}
{"level":"info","ts":1673669423.6954088,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1673669423.6955872,"logger":"http","msg":"enabling HTTP/3 listener","addr":":8443"}
{"level":"info","ts":1673669423.695814,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details."}
{"level":"info","ts":1673669423.6960337,"logger":"http.log","msg":"server running","name":"srv1","protocols":["h1","h2","h3"]}
{"level":"error","ts":1673669423.6962113,"msg":"unable to create folder for config autosave","dir":"/root/.config/caddy","error":"mkdir /root/.config: permission denied"}
{"level":"info","ts":1673669423.6963387,"msg":"serving initial configuration"}
{"level":"info","ts":1673669423.69629,"logger":"tls","msg":"finished cleaning storage units"}
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 14 04:10:23.712143 2023] [ssl:warn] [pid 119] AH01906: 172.17.0.3:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat Jan 14 04:10:23.712197 2023] [ssl:warn] [pid 119] AH01909: 172.17.0.3:8080:0 server certificate does NOT include an ID which matches the server name
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 14 04:10:23.738399 2023] [ssl:warn] [pid 119] AH01906: 172.17.0.3:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat Jan 14 04:10:23.738426 2023] [ssl:warn] [pid 119] AH01909: 172.17.0.3:8080:0 server certificate does NOT include an ID which matches the server name
[Sat Jan 14 04:10:23.741597 2023] [mpm_prefork:notice] [pid 119] AH00163: Apache/2.4.54 (Debian) PHP/8.1.13 OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Jan 14 04:10:23.741624 2023] [core:notice] [pid 119] AH00094: Command line: 'apache2 -D FOREGROUND'
Deleted Images:
untagged: nextcloud/aio-postgresql@sha256:cd1bf968ef216aaf9fff9cfc781385fa81cc475a990dc664899321a084ad45ec
deleted: sha256:3ab45873d65746afbea28c3bf55bf1b3edbf43d20d43a6c863b99e6a408e2014
deleted: sha256:ca11d537342021779e4f8d39938ec87beeead07e12f0ac7b7ea18d063a70b35b
deleted: sha256:06b113d2b710defde6bf22fa5971ad1a0ae4db377818e36db23afcb61242d701
deleted: sha256:b5634fb08a18aae0b3aa698c2ed6c91ac39e374ef4c4c7e21285f949e63c69f1
deleted: sha256:ae6870874857f65571b8266d5e2283ab4709834c83d9d6f2615e7ef0a7b734db
deleted: sha256:e2db353f62aeac0376cd5d403a8f4f6d37ce7afd4909675f304c9fe4849a409d
deleted: sha256:0a21eca94d705cba7406ddf8b4d2c6daec4345adb7eb2c94f9e84757f1a51556
deleted: sha256:c5a3b9aed32043e3a418efbc72de941de15d75e743083fca299b7a0c0f3547f1
deleted: sha256:2f7b1100eb9dd94515fddea731af64875f0f483109daf224cc077022e6027fac
deleted: sha256:ea7af191b6d77915e91f2e2716e03a1416bdbc71bb661c9be46b9fea14175f83
deleted: sha256:f34788297cb736b5476566693503ad3dd04daae2f41a7348781f16d79968a07b
deleted: sha256:a3f142d1597d6fb796634583f1e127181aba66a3ba845b7991a1db3839e0d6e1
deleted: sha256:1cfa1d44ea772e1bf77e55211ec48c45fc6bde59bbf57c46610e6a764dcc7d68
deleted: sha256:beeae671e87eb76246c93e13909396887d3a41be7563ff01b702f6e68674f24b
untagged: nextcloud/aio-nextcloud@sha256:d550cc630ed71cd597f6c55fffd63d9abb236c44813a1ccd99e2615a24698267
deleted: sha256:a94ff99c0707bd2ee28f4a1f37ba99ef9dbde54b82ec097dfe3d3e4be9ec155f
deleted: sha256:4c2ed69da1195aa77ba6a3d803b57c6269a998e056054d406f9706e146510b33
deleted: sha256:ea231146eded9182e481427959f24c1cca7f0301d67c6928007176fe3c7abe2a
deleted: sha256:be9b42ed77ab3d58659e7442c301f1117f3a233d70233658ed3c28050e67141c
deleted: sha256:66dc33c1d637c5cce0e66c3d034eda80e5e5165c27fb6a1f7263b5b696b6d761
deleted: sha256:87a910916a1fa63b66050e66af425a02f73f85f191259c943a2d5354136db7a3
deleted: sha256:0d2a8303c21538b5a4878f6d69468b2b0fc5f55275c7e70de11c6b1c8f301194
deleted: sha256:b6517ae738112f615e3e34cd2fad307b1f956c647a44a1872601b6e3e2506413
deleted: sha256:88b6d1782f151c33b1372662c3c13c8eff9d0819abb2c4c0b46d46b1873eb5d5
deleted: sha256:a9aa247b66ebb2bf3c5980f10d795088d80366daeb70b163ce2131fa1ccc7a75
deleted: sha256:bf917235132ae462b243c3f415664911bd1af3fb60e427f579d4959b161ee632
deleted: sha256:c3f7bee5a9b2b01c3038fc70ba0b6757438738361039166d0173eeaa5ef7496c
deleted: sha256:337f663142460c0599d304bcbd8af6d7ce33eb01e9fedf4d13225632475f66d3
deleted: sha256:1b68490d7d1bb8411742d589baef9944b126009b3f79757d9463690d3e64e7c1
deleted: sha256:a014c59b9ec27ffe49c4593d906180bdbe917b65cb6df4a2d9018cea693f05b4
deleted: sha256:0df45c9c39a00801c43e1f3c4aef4e13c483cb40e9b59d681b2035d912b9e725
deleted: sha256:af3a0f4bf22d838a4aacdcfb50dda6b14c017a1a1bb63c7aeb68e447312e33e2
deleted: sha256:0889026e14b51a6ac0ed7b6f3fe24a616cf185850e855f90a65617548594d1c8
deleted: sha256:ca76a2c0c3d45778f09eddc74a9b95b6e3002d222a8673e84e87a29299efc1ee
deleted: sha256:a044e5c230e523bc14f6be5d7f2e73d0a5cfd1228188bf7680452e0dc52d172c
deleted: sha256:9bacdf95241398dbe3e7fba1e70f28ac7c9f50680cf5bac7a696745bf1623337
deleted: sha256:551fd4c4e422cdd99398400dab9d9c28ffac72d56e0cc848d4f5ac07f15f3e18
untagged: nextcloud/aio-apache@sha256:f1da3e5f66bac4c5dadee7bd9ae0f33c72b82c398eda9ed6b1e6f7efeed0f448
deleted: sha256:24943249c25f17ac49268d90736c5695a04843a214e0d06c63510bb4accf9eb7
deleted: sha256:fdf85c54dec58423a08c697cd9a3ae99f1c8e2b5f29fd2edf850ee6796484328
deleted: sha256:34a8a4cf76571d3332ac04fdbcecfa0af12937a3e4334a1610e690156a44bdd7
deleted: sha256:53fba2aeb6d907314ab5133e2aa1aee543d26403e296499da3ae7c51384b4a78
deleted: sha256:406f663300bb3a9c1551ac2aa4799091984aab0d388fae63c65ccc70d9b0da36
deleted: sha256:83a8ccc3ff45998e934d39d09ab0dbae566e71011f2dcaa8a21992e390011149
deleted: sha256:95041acdc9523400e13a2bb31c1e495fbc0e4035c6b11d0fd16896b71d6c65a6
deleted: sha256:dc0dffd7ec83f65ada32837d3a3083d77d49308d54390e179b95f23b38f47d35
deleted: sha256:406d9e6a89508276446083702c74cddfcea8aa23e89ec8fd37c2d2d869229077
deleted: sha256:7ab984474924b5146a80705020a7caf3b75ff91f271a4f718bddd7aff0a9805c
deleted: sha256:dd44e10b3ea1d243b928d65c980793b3043c01ee7fe0a4dccb09c5a6505eb8cd
deleted: sha256:2ed16b8f3acd846211c53c411c1e3236936bf80348e64ed28459178a63ec2606
deleted: sha256:8d6cb813b19aa7ca21c80012d14dc6875eeab7158bb4ab2ca0bd8ca954ac0dcb
deleted: sha256:7ac3bd012c28ba548718e7faa7a210a948e9c7ff2424534db6703f5cee1f73f9
deleted: sha256:2b9ecc121cb1f5f42baf2932baecfc1023019ffa908152cef6e214c1b3d47410
deleted: sha256:8882ad4d6d9f61f5e12cb009fb5b6aef2ad21b997891bfd2b55cd8416555ff29
untagged: nextcloud/aio-redis@sha256:5c37c630a8991b0c1d05cc60bc8b61e93b24626dae095914c0224b9a1fd97fb9
deleted: sha256:5ddd8f6ac2c0eb4df5950b674fa3a50ee50923ea39eec0e8a99d5884685c7830
deleted: sha256:68ccd86a964f6db73a24f2c62da76b1031ddff1a191612fbd227a7e35edd4649
deleted: sha256:5ff0607e2f805248652c248dd400db4f708544db6f6f3d131e322b5a258a84e5
deleted: sha256:694bb966cb62b30ee8b037ad35226c5ab1881c8dbf1d895b61e6debd1a578e71
deleted: sha256:b2ccd24acc1974183e28e917820a2fd2905a7c2bbbafbe105ff77509a98209a3
untagged: nextcloud/aio-watchtower@sha256:a8e4dccef75c877d72f6d44b8da53383d3bbe2706034667f61bc5b8b9243a288
deleted: sha256:4cb393c4a07cf576436fde9f2b44ccef3c2574e4a7c6d1650552b9b7e212434b
deleted: sha256:08faffe83dadedc5c4b0b34a5e69a84afd6feffb35591e0ed9e773bbf44fcb81
deleted: sha256:47c87fbecdd5f718ed13fb704e574e37ef456c63f990486d89446f58c5ec656c
deleted: sha256:219ec10e82c24bfc8fe86e3d83dff62959bc33c3e62781b46ae68c98ff50498e
deleted: sha256:cf67d2f522b3e9d451dadcbb63015d63101349e4318b9b1574148064942b9ca4

Total reclaimed space: 1.647GB
{"level":"info","ts":1673755823.7044108,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/mnt/docker-aio-config/caddy/"}
{"level":"info","ts":1673755823.709948,"logger":"tls","msg":"finished cleaning storage units"}

n 15 04:45:45.103724 2023] [php:notice] [pid 162308] [client 127.0.0.1:53702] 404 Not Found\nType: Slim\\Exception\\HttpNotFoundException\nCode: 404\nMessage: Not found.\nFile: /var/www/docker-aio/php/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php\nLine: 76\nTrace: #0 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/RouteRunner.php(56): Slim\\Middleware\\RoutingMiddleware->performRouting(Object(GuzzleHttp\\Psr7\\ServerRequest))\n#1 /var/www/docker-aio/php/vendor/slim/csrf/src/Guard.php(476): Slim\\Routing\\RouteRunner->handle(Object(GuzzleHttp\\Psr7\\ServerRequest))\n#2 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(168): Slim\\Csrf\\Guard->process(Object(GuzzleHttp\\Psr7\\ServerRequest), Object(Slim\\Routing\\RouteRunner))\n#3 /var/www/docker-aio/php/vendor/slim/twig-view/src/TwigMiddleware.php(115): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\\Psr7\\ServerRequest))\n#4 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\\Views\\TwigMiddleware->process(Object(GuzzleHttp\\Psr7\\ServerRequest), Object(Psr\\Http\\Server\\RequestHandlerInterface@anonymous))\n#5 /var/www/docker-aio/php/src/Middleware/AuthMiddleware.php(38): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\\Psr7\\ServerRequest))\n#6 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): AIO\\Middleware\\AuthMiddleware->__invoke(Object(GuzzleHttp\\Psr7\\ServerRequest), Object(Psr\\Http\\Server\\RequestHandlerInterface@anonymous))\n#7 /var/www/docker-aio/php/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\\Psr7\\ServerRequest))\n#8 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\\Middleware\\ErrorMiddleware->process(Object(GuzzleHttp\\Psr7\\ServerRequest), Object(Psr\\Http\\Server\\RequestHandlerInterface@anonymous))\n#9 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\\Psr7\\ServerRequest))\n#10 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(199): Slim\\MiddlewareDispatcher->handle(Object(GuzzleHttp\\Psr7\\ServerRequest))\n#11 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(183): Slim\\App->handle(Object(GuzzleHttp\\Psr7\\ServerRequest))\n#12 /var/www/docker-aio/php/public/index.php(170): Slim\\App->run()\n#13 {main}, referer: https://198.244.251.96:8080/api/docker/logs?id=nextcloud-aio-nextcloud
Initial startup of Nextcloud All In One complete!
You should be able to open the Nextcloud AIO Interface now on port 8080 of this server!
E.g. https://internal.ip.of.this.server:8080

If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
https://your-domain-that-points-to-this-server.tld:8443
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message
[Sun Jan 15 05:06:25.063181 2023] [ssl:warn] [pid 95] AH01906: 172.17.0.6:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jan 15 05:06:25.063224 2023] [ssl:warn] [pid 95] AH01909: 172.17.0.6:8080:0 server certificate does NOT include an ID which matches the server name
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message
[Sun Jan 15 05:06:25.118598 2023] [ssl:warn] [pid 95] AH01906: 172.17.0.6:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jan 15 05:06:25.118618 2023] [ssl:warn] [pid 95] AH01909: 172.17.0.6:8080:0 server certificate does NOT include an ID which matches the server name
[Sun Jan 15 05:06:25.124132 2023] [mpm_prefork:notice] [pid 95] AH00163: Apache/2.4.54 (Debian) PHP/8.1.13 OpenSSL/1.1.1n configured -- resuming normal operations
[Sun Jan 15 05:06:25.124179 2023] [core:notice] [pid 95] AH00094: Command line: 'apache2 -D FOREGROUND'
{"level":"info","ts":1673759185.138117,"msg":"using provided configuration","config_file":"/Caddyfile","config_adapter":""}
{"level":"warn","ts":1673759185.1396837,"msg":"Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies","adapter":"caddyfile","file":"/Caddyfile","line":2}
{"level":"info","ts":1673759185.1412354,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1673759185.1417406,"logger":"http","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"warn","ts":1673759185.1417549,"logger":"http","msg":"automatic HTTP->HTTPS redirects are disabled","server_name":"srv1"}
{"level":"warn","ts":1673759185.142972,"logger":"tls","msg":"YOUR SERVER MAY BE VULNERABLE TO ABUSE: on-demand TLS is enabled, but no protections are in place","docs":"https://caddyserver.com/docs/automatic-https#on-demand-tls"}
{"level":"info","ts":1673759185.1430204,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00029d1f0"}
{"level":"info","ts":1673759185.1432247,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/mnt/docker-aio-config/caddy/"}
{"level":"info","ts":1673759185.1436462,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1673759185.1436846,"logger":"http","msg":"enabling HTTP/3 listener","addr":":8443"}
{"level":"info","ts":1673759185.1440825,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details."}
{"level":"info","ts":1673759185.1449478,"logger":"http.log","msg":"server running","name":"srv1","protocols":["h1","h2","h3"]}
{"level":"error","ts":1673759185.1449792,"msg":"unable to create folder for config autosave","dir":"/root/.config/caddy","error":"mkdir /root/.config: permission denied"}
{"level":"info","ts":1673759185.1449902,"msg":"serving initial configuration"}
{"level":"info","ts":1673759185.1458092,"logger":"tls","msg":"finished cleaning storage units"}
Sid127 commented 1 year ago

Adding nginx logs here just in case

Jan 15 05:06:20 archlinux systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 15 05:06:20 archlinux nginx[462]: 2023/01/15 05:06:20 [warn] 462#462: could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
Jan 15 05:06:20 archlinux systemd[1]: Started A high performance web server and a reverse proxy server.
Jan 15 05:06:36 archlinux nginx[466]: 2023/01/15 05:06:36 [error] 466#466: *25 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.17.0.5, server: cloud.sloughland.dev, request: "GET /index.php/apps/notify_push/test/version HTTP/2.0", upstream: "http://127.0.0.1:11000/index.php/apps/notify_push/test/version", host: "cloud.sloughland.dev"
szaimen commented 1 year ago

Hi, can you post the Nextloud and apache container logs here?

Sid127 commented 1 year ago

Sure, here we go:

Apache:

nc: getaddrinfo for host "nextcloud-aio-nextcloud" port 9000: Name or service not known
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message
{"level":"info","ts":1673757923.7065527,"msg":"using provided configuration","config_file":"/Caddyfile","config_adapter":""}
{"level":"warn","ts":1673757923.7088008,"msg":"Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies","adapter":"caddyfile","file":"/Caddyfile","line":2}
{"level":"info","ts":1673757923.7100606,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1673757923.7103746,"logger":"http","msg":"automatic HTTPS is completely disabled for server","server_name":"srv0"}
{"level":"info","ts":1673757923.7104611,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0007048c0"}
{"level":"info","ts":1673757923.7113807,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1673757923.711547,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/mnt/data/caddy"}
{"level":"info","ts":1673757923.7116919,"msg":"autosaved config (load with --resume flag)","file":"/var/www/.config/caddy/autosave.json"}
{"level":"info","ts":1673757923.7116992,"msg":"serving initial configuration"}
{"level":"info","ts":1673757923.7127547,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1673759068.549907,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1673759068.5504904,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1673759068.5530791,"logger":"tls.cache.maintenance","msg":"stopped background certificate maintenance","cache":"0xc0007048c0"}
{"level":"info","ts":1673759068.553629,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1673759068.5536478,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.4. Set the 'ServerName' directive globally to suppress this message
{"level":"info","ts":1673759199.4715323,"msg":"using provided configuration","config_file":"/Caddyfile","config_adapter":""}
{"level":"warn","ts":1673759199.4740107,"msg":"Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies","adapter":"caddyfile","file":"/Caddyfile","line":2}
{"level":"info","ts":1673759199.4765534,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1673759199.477033,"logger":"http","msg":"automatic HTTPS is completely disabled for server","server_name":"srv0"}
{"level":"info","ts":1673759199.4778697,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000708930"}
{"level":"info","ts":1673759199.4791114,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1673759199.4799387,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/mnt/data/caddy"}
{"level":"info","ts":1673759199.4800577,"msg":"autosaved config (load with --resume flag)","file":"/var/www/.config/caddy/autosave.json"}
{"level":"info","ts":1673759199.4800658,"msg":"serving initial configuration"}
{"level":"info","ts":1673759199.4839795,"logger":"tls","msg":"finished cleaning storage units"}

Nextcloud:

nc: getaddrinfo: Try again
Waiting for database to start...
               now                
----------------------------------
 2023-01-15 10:14:58.260687+05:30
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Installing imagemagick via apk...
Enabling Imagick...
Configuring Redis as session handler...
Setting php max children...
System config value tempdirectory set to string /mnt/ncdata/tmp/
Applying one-click-instance settings...
System config value one-click-instance set to boolean true
System config value one-click-instance.user-limit set to integer 100
System config value one-click-instance.link set to string https://nextcloud.com/all-in-one/
support already enabled
Adjusting log files...
System config value logfile set to string /var/www/html/data/nextcloud.log
Config value logfile for app admin_audit set to /var/www/html/data/audit.log
Applying network settings...
System config value trusted_domains => 1 set to string cloud.sloughland.dev
System config value overwrite.cli.url set to string https://cloud.sloughland.dev/
System config value htaccess.RewriteBase set to string /
.htaccess has been updated
System config value files_external_allow_create_new_local set to boolean false
System config value trusted_proxies => 0 set to string 127.0.0.1
System config value trusted_proxies => 1 set to string ::1
Config value base_endpoint for app notify_push set to https://cloud.sloughland.dev/push
System config value enabledPreviewProviders => 0 deleted
System config value preview_imaginary_url deleted
[15-Jan-2023 10:15:19] NOTICE: fpm is running, pid 226
[15-Jan-2023 10:15:19] NOTICE: ready to handle connections
[2023-01-15 10:34:27.617346 +05:30] WARN [notify_push] src/lib.rs:418: Redis server disconnected, reconnecting in 1s
[15-Jan-2023 10:34:27] NOTICE: Terminating ...
[15-Jan-2023 10:34:27] NOTICE: exiting, bye-bye!
               now                
----------------------------------
 2023-01-15 10:36:25.074354+05:30
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Configuring Redis as session handler...
Setting php max children...
System config value tempdirectory set to string /mnt/ncdata/tmp/
Applying one-click-instance settings...
System config value one-click-instance set to boolean true
System config value one-click-instance.user-limit set to integer 100
System config value one-click-instance.link set to string https://nextcloud.com/all-in-one/
support already enabled
Adjusting log files...
System config value logfile set to string /var/www/html/data/nextcloud.log
Config value logfile for app admin_audit set to /var/www/html/data/audit.log
Applying network settings...
System config value trusted_domains => 1 set to string cloud.sloughland.dev
System config value overwrite.cli.url set to string https://cloud.sloughland.dev/
System config value htaccess.RewriteBase set to string /
.htaccess has been updated
System config value files_external_allow_create_new_local set to boolean false
System config value trusted_proxies => 0 set to string 127.0.0.1
System config value trusted_proxies => 1 set to string ::1
Config value base_endpoint for app notify_push set to https://cloud.sloughland.dev/push
System config value enabledPreviewProviders => 0 deleted
System config value preview_imaginary_url deleted
[15-Jan-2023 10:36:35] NOTICE: fpm is running, pid 192
[15-Jan-2023 10:36:35] NOTICE: ready to handle connections
szaimen commented 1 year ago

Hm looks good. Can you also post your nginx config here? Also is nginx running on the host or inside a container? Additionally, what is the output of sudo docker inspect nextcloud-aio-apache?

Sid127 commented 1 year ago

nginx is running on the host, here's the config:

#user http;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
    }

    server {
        listen       80;

        if ($scheme = "http") {
            return 301 https://$host$request_uri;
        }

    listen 443 ssl http2;

    server_name cloud.sloughland.dev;

        location / {
            proxy_pass http://127.0.0.1:11000$request_uri;

            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 0;

            # Websocket
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
        }

        ssl_certificate /etc/letsencrypt/live/chat.sloughland.dev/fullchain.pem;   # managed by certbot on host machine
        ssl_certificate_key /etc/letsencrypt/live/chat.sloughland.dev/privkey.pem; # managed by certbot on host machine

        ssl_session_timeout 1d;
        ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
        ssl_session_tickets off;

        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
        ssl_prefer_server_ciphers off;

    }

    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

    # HTTPS server
    #
    server {
        listen       443 ssl http2;
        listen [::]:443 ssl http2;

    # For the federation port
        listen 8448 ssl http2 default_server;
        listen [::]:8448 ssl http2 default_server;

        server_name  chat.sloughland.dev;

        location ~ ^(/_matrix|/_synapse/client) {
            # note: do not add a path (even a single /) after the port in `proxy_pass`,
            # otherwise nginx will canonicalise the URI and cause signature verification
            # errors.
            proxy_pass http://127.0.0.1:8008;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $host;

            # Nginx by default only allows file uploads up to 1M in size
            # Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
            client_max_body_size 50M;

        # Synapse responses may be chunked, which is an HTTP/1.1 feature.
        proxy_http_version 1.1;
        }

        ssl_certificate /etc/letsencrypt/live/chat.sloughland.dev/fullchain.pem;   # managed by certbot on host machine
        ssl_certificate_key /etc/letsencrypt/live/chat.sloughland.dev/privkey.pem; # managed by certbot on host machine

        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  5m;

        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;

        location / {
            root   html;
            index  index.html index.htm;
        }
    }

}

and here's the output of docker inspect:

[
    {
        "Id": "ccf12f366ba0511729a637809df8ac4a3bfa506f4f104fcc685d9cbf07d1f0ad",
        "Created": "2023-01-15T04:44:47.08121225Z",
        "Path": "start.sh",
        "Args": [
            "/usr/bin/supervisord",
            "-c",
            "/supervisord.conf"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 863,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-01-15T05:06:22.896277748Z",
            "FinishedAt": "2023-01-15T05:04:28.588333993Z",
            "Health": {
                "Status": "healthy",
                "FailingStreak": 0,
                "Log": [
                    {
                        "Start": "2023-01-15T09:31:21.630459957Z",
                        "End": "2023-01-15T09:31:21.740918682Z",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2023-01-15T09:31:51.742203172Z",
                        "End": "2023-01-15T09:31:51.847388623Z",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2023-01-15T09:32:21.849802294Z",
                        "End": "2023-01-15T09:32:21.945888815Z",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2023-01-15T09:32:51.948059333Z",
                        "End": "2023-01-15T09:32:52.0552224Z",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2023-01-15T09:33:22.058559296Z",
                        "End": "2023-01-15T09:33:22.177177193Z",
                        "ExitCode": 0,
                        "Output": ""
                    }
                ]
            }
        },
        "Image": "sha256:bfa611cbaf671cff9bb7773b169b4f9cb2e66575829bca17b09c6518baf281e2",
        "ResolvConfPath": "/var/lib/docker/containers/ccf12f366ba0511729a637809df8ac4a3bfa506f4f104fcc685d9cbf07d1f0ad/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/ccf12f366ba0511729a637809df8ac4a3bfa506f4f104fcc685d9cbf07d1f0ad/hostname",
        "HostsPath": "/var/lib/docker/containers/ccf12f366ba0511729a637809df8ac4a3bfa506f4f104fcc685d9cbf07d1f0ad/hosts",
        "LogPath": "/var/lib/docker/containers/ccf12f366ba0511729a637809df8ac4a3bfa506f4f104fcc685d9cbf07d1f0ad/ccf12f366ba0511729a637809df8ac4a3bfa506f4f104fcc685d9cbf07d1f0ad-json.log",
        "Name": "/nextcloud-aio-apache",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "nextcloud_aio_nextcloud:/var/www/html:ro",
                "nextcloud_aio_apache:/mnt/data:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {
                "11000/tcp": [
                    {
                        "HostIp": "127.0.0.1",
                        "HostPort": "11000"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "unless-stopped",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/8ad61b15a42bebedd48f215bbcee6adcc5b733209596d82f97e9de88d78f1c03-init/diff:/var/lib/docker/overlay2/b2fe6b35417717edea342610cb7e24e2a173bb9cca26fbceddeae0e63145ad2c/diff:/var/lib/docker/overlay2/452d6a332acac96adbf78d9ba5bdaf425b150cfbacae5cccd6e2bd413bab2363/diff:/var/lib/docker/overlay2/e998878a95cd80321dc15afe66f7b9b906b2460f09aeeac6377764e961f631bd/diff:/var/lib/docker/overlay2/7fb506552fcf768be3fa628880d8909dbd3c97e1e97f614efc18fd27ca7f9978/diff:/var/lib/docker/overlay2/c6bddb506951f8fc91d104846d8357ba91db68e689b3d9151af641e00672fb0a/diff:/var/lib/docker/overlay2/32310daca724a10351f0289433ae10590948289a72b11a78740158247700f9f4/diff:/var/lib/docker/overlay2/7f7a3396660bcb88fd3af726f92c0b564b07582fd10fe8b067883b53392c456d/diff:/var/lib/docker/overlay2/5240ad4dfc339db09ecd4ae05cf0a914919f38d881b189dd1b9770ec4f5e4d5a/diff:/var/lib/docker/overlay2/dd391760a537e8da235ee1278820417283aa72b4ab2a8cfc4d0e05b0e619916b/diff:/var/lib/docker/overlay2/d99f3892f0f939d3999a1f74ee4350144b168b445140ea857055931bbaab10f3/diff:/var/lib/docker/overlay2/9f922caaf7bda5b96f30c5f76c81c4d006164ef733211161657dcac672b70145/diff:/var/lib/docker/overlay2/1c80423cf18ed07deb5b0aec8cb2ecfcd29028bff1e130272b7940450549c839/diff:/var/lib/docker/overlay2/a6f61d7d4d42f69e92bb0dbd0afe81e8b9ba941220c2329c619a62836215c6ed/diff:/var/lib/docker/overlay2/213fb474e55aff15747025635c4a52554aa5469effb3267770474366105888ed/diff:/var/lib/docker/overlay2/a74ddd2237373599c22ef05530ce9ff4ba02f1a91128a303687f9ab8b691c25c/diff:/var/lib/docker/overlay2/0bf1682e5ab215c0fbbc78e4c210c77194e01b8a71459204c53ca17f1b666d83/diff",
                "MergedDir": "/var/lib/docker/overlay2/8ad61b15a42bebedd48f215bbcee6adcc5b733209596d82f97e9de88d78f1c03/merged",
                "UpperDir": "/var/lib/docker/overlay2/8ad61b15a42bebedd48f215bbcee6adcc5b733209596d82f97e9de88d78f1c03/diff",
                "WorkDir": "/var/lib/docker/overlay2/8ad61b15a42bebedd48f215bbcee6adcc5b733209596d82f97e9de88d78f1c03/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "volume",
                "Name": "nextcloud_aio_apache",
                "Source": "/var/lib/docker/volumes/nextcloud_aio_apache/_data",
                "Destination": "/mnt/data",
                "Driver": "local",
                "Mode": "rw",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "volume",
                "Name": "nextcloud_aio_nextcloud",
                "Source": "/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data",
                "Destination": "/var/www/html",
                "Driver": "local",
                "Mode": "ro",
                "RW": false,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "ccf12f366ba0",
            "Domainname": "",
            "User": "www-data",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "11000/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "NC_DOMAIN=cloud.sloughland.dev",
                "NEXTCLOUD_HOST=nextcloud-aio-nextcloud",
                "COLLABORA_HOST=nextcloud-aio-collabora",
                "TALK_HOST=nextcloud-aio-talk",
                "APACHE_PORT=11000",
                "ONLYOFFICE_HOST=nextcloud-aio-onlyoffice",
                "TZ=Asia/Calcutta",
                "APACHE_MAX_SIZE=10737418240",
                "APACHE_MAX_TIME=3600",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/usr/bin/supervisord",
                "-c",
                "/supervisord.conf"
            ],
            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "healthcheck.sh"
                ]
            },
            "Image": "nextcloud/aio-apache:latest",
            "Volumes": {
                "/mnt/data": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "start.sh"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "9c150c3d443f6651709c813a29b15b55711e5e5a61d0eaacc745793786b81cf2",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "11000/tcp": [
                    {
                        "HostIp": "127.0.0.1",
                        "HostPort": "11000"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/9c150c3d443f",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "31b71101e3326b2bf2a90d31b8d5b076db98a06fc6b2f9ff81b1e5772b168078",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.4",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:04",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "dc776f346747882a36e04d35f9c140fa68c269c411ff413e2f9ee2131172f0fa",
                    "EndpointID": "31b71101e3326b2bf2a90d31b8d5b076db98a06fc6b2f9ff81b1e5772b168078",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.4",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:04",
                    "DriverOpts": null
                },
                "nextcloud-aio": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "ccf12f366ba0"
                    ],
                    "NetworkID": "0eb9b7aa9fde660fd9912953359535f20543ab9690cb2da7b4a5b824c7751f49",
                    "EndpointID": "814b274af9b1efa30231758ec515a0375bde56d909371ad2cdc3edad312901fe",
                    "Gateway": "172.18.0.1",
                    "IPAddress": "172.18.0.4",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:12:00:04",
                    "DriverOpts": null
                }
            }
        }
    }
]
szaimen commented 1 year ago

Hm... Also looks good.

Can you try to run curl -L http://127.0.0.1:11000/login.php on the host?

Sid127 commented 1 year ago
[botuser@archlinux ~]$ curl -L http://127.0.0.1:11000/login.php
File not found.
szaimen commented 1 year ago

Okay and sudo docker exec -it nextcloud-aio-apache ls -l

Sid127 commented 1 year ago
[botuser@archlinux ~]$ sudo docker exec -it nextcloud-aio-apache ls -l
total 88
-rw-r--r--   1 www-data www-data 1669 Jan 15 10:36 Caddyfile
drwxr-xr-x   1 root     root     4096 Jan  4 21:44 bin
drwxr-xr-x   2 root     root     4096 Dec 10 00:45 boot
drwxr-xr-x   5 root     root      340 Jan 15 10:36 dev
drwxr-xr-x   1 root     root     4096 Jan 15 10:14 etc
drwxr-xr-x   2 root     root     4096 Dec 10 00:45 home
drwxr-xr-x   1 root     root     4096 Dec 19 05:30 lib
drwxr-xr-x   2 root     root     4096 Dec 19 05:30 lib64
drwxr-xr-x   2 root     root     4096 Dec 19 05:30 media
drwxr-xr-x   1 root     root     4096 Jan  4 21:44 mnt
drwxr-xr-x   2 root     root     4096 Dec 19 05:30 opt
dr-xr-xr-x 287 root     root        0 Jan 15 10:36 proc
drwx------   2 root     root     4096 Dec 19 05:30 root
drwxr-xr-x   1 root     root     4096 Jan  4 21:44 run
drwxr-xr-x   1 root     root     4096 Jan  4 21:44 sbin
drwxr-xr-x   2 root     root     4096 Dec 19 05:30 srv
-rw-r--r--   1 root     root      629 Jan  4 21:43 supervisord.conf
dr-xr-xr-x  13 root     root        0 Jan 15 10:36 sys
drwxrwxrwt   1 root     root     4096 Jan 15 10:36 tmp
drwxr-xr-x   1 root     root     4096 Dec 19 05:30 usr
drwxr-xr-x   1 root     root     4096 Jan  4 21:44 var
szaimen commented 1 year ago

Hm interesting. And sudo docker exec -it nextcloud-aio-apache ls -l /var/www/html?

Sid127 commented 1 year ago

From what I can tell, the container's default dir is not correct?

[botuser@archlinux ~]$ sudo docker exec -it nextcloud-aio-apache ls -l /var/www/html
total 168
drwxr-xr-x 47 www-data www-data  4096 Dec 30 11:57 3rdparty
-rw-r--r--  1 www-data www-data 19327 Dec 30 11:57 AUTHORS
-rw-r--r--  1 www-data www-data 34520 Dec 30 11:57 COPYING
drwxr-xr-x 50 www-data www-data  4096 Dec 30 11:57 apps
drwxr-xr-x  2 www-data www-data  4096 Jan 15 10:36 config
-rw-r--r--  1 www-data www-data  4095 Dec 30 11:57 console.php
drwxr-xr-x 23 www-data www-data  4096 Dec 30 11:57 core
-rw-r--r--  1 www-data www-data  6317 Dec 30 11:57 cron.php
drwxr-xr-x 14 www-data www-data  4096 Dec 30 12:01 custom_apps
drwxr-xr-x  2 www-data www-data  4096 Jan 12 18:37 data
drwxr-xr-x  2 www-data www-data 12288 Dec 30 11:57 dist
-rw-r--r--  1 www-data www-data   156 Dec 30 11:57 index.html
-rw-r--r--  1 www-data www-data  3456 Dec 30 11:57 index.php
drwxr-xr-x  6 www-data www-data  4096 Dec 30 11:57 lib
-rwxr-xr-x  1 www-data www-data   283 Dec 30 11:57 occ
drwxr-xr-x  2 www-data www-data  4096 Dec 30 11:57 ocm-provider
drwxr-xr-x  2 www-data www-data  4096 Dec 30 11:57 ocs
drwxr-xr-x  2 www-data www-data  4096 Dec 30 11:57 ocs-provider
-rw-r--r--  1 www-data www-data  3139 Dec 30 11:57 public.php
-rw-r--r--  1 www-data www-data  5549 Dec 30 11:57 remote.php
drwxr-xr-x  4 www-data www-data  4096 Dec 30 11:57 resources
-rw-r--r--  1 www-data www-data    26 Dec 30 11:57 robots.txt
-rw-r--r--  1 www-data www-data  2452 Dec 30 11:57 status.php
drwxr-xr-x  3 www-data www-data  4096 Oct 25 17:47 themes
drwxr-xr-x  2 www-data www-data  4096 Dec 30 11:57 updater
-rw-r--r--  1 www-data www-data   383 Dec 30 11:57 version.php
szaimen commented 1 year ago

No, I had a look at the dockerfile and it is correct that the default dir is root since we dont set it but this shouldnt be a problem.

szaimen commented 1 year ago

Can you try

sudo docker exec -it nextcloud-aio-apache ls -al /var/www/html

Sid127 commented 1 year ago

well, here you go

[botuser@archlinux ~]$ sudo docker exec -it nextcloud-aio-apache ls -al /var/www/html
total 184
drwxr-xr-x 16 www-data www-data  4096 Dec 30 11:57 .
drwxr-xr-x  1 www-data www-data  4096 Jan 15 10:31 ..
-rw-r--r--  1 www-data www-data  1132 Jan 15 10:36 .htaccess
-rw-r--r--  1 www-data www-data   101 Dec 30 11:57 .user.ini
drwxr-xr-x 47 www-data www-data  4096 Dec 30 11:57 3rdparty
-rw-r--r--  1 www-data www-data 19327 Dec 30 11:57 AUTHORS
-rw-r--r--  1 www-data www-data 34520 Dec 30 11:57 COPYING
drwxr-xr-x 50 www-data www-data  4096 Dec 30 11:57 apps
drwxr-xr-x  2 www-data www-data  4096 Jan 15 10:36 config
-rw-r--r--  1 www-data www-data  4095 Dec 30 11:57 console.php
drwxr-xr-x 23 www-data www-data  4096 Dec 30 11:57 core
-rw-r--r--  1 www-data www-data  6317 Dec 30 11:57 cron.php
drwxr-xr-x 14 www-data www-data  4096 Dec 30 12:01 custom_apps
drwxr-xr-x  2 www-data www-data  4096 Jan 12 18:37 data
drwxr-xr-x  2 www-data www-data 12288 Dec 30 11:57 dist
-rw-r--r--  1 www-data www-data   156 Dec 30 11:57 index.html
-rw-r--r--  1 www-data www-data  3456 Dec 30 11:57 index.php
drwxr-xr-x  6 www-data www-data  4096 Dec 30 11:57 lib
-rwxr-xr-x  1 www-data www-data   283 Dec 30 11:57 occ
drwxr-xr-x  2 www-data www-data  4096 Dec 30 11:57 ocm-provider
drwxr-xr-x  2 www-data www-data  4096 Dec 30 11:57 ocs
drwxr-xr-x  2 www-data www-data  4096 Dec 30 11:57 ocs-provider
-rw-r--r--  1 www-data www-data  3139 Dec 30 11:57 public.php
-rw-r--r--  1 www-data www-data  5549 Dec 30 11:57 remote.php
drwxr-xr-x  4 www-data www-data  4096 Dec 30 11:57 resources
-rw-r--r--  1 www-data www-data    26 Dec 30 11:57 robots.txt
-rw-r--r--  1 www-data www-data  2452 Dec 30 11:57 status.php
drwxr-xr-x  3 www-data www-data  4096 Oct 25 17:47 themes
drwxr-xr-x  2 www-data www-data  4096 Dec 30 11:57 updater
-rw-r--r--  1 www-data www-data   383 Dec 30 11:57 version.php
szaimen commented 1 year ago

Hm... Looks good.

szaimen commented 1 year ago

I suppose you already tried to restart the containers from the AIO interface but that didnt make it work?

Sid127 commented 1 year ago

Yup, also did a full restart of the host, and that didn't help either

szaimen commented 1 year ago

I suppose it would be helpful to maybe get the update log. Can you post the output of sudo docker exec -it nextcloud-aio-nextcloud cat data/update.log?

Sid127 commented 1 year ago

absolutely, here you go:

[botuser@archlinux ~]$ sudo docker exec -it nextcloud-aio-nextcloud cat data/update.log
Checking connection to appstore
Appstore is reachable
Maintenance mode already disabled
Getting and backing up the status of apps for later, this might take a while...
Disabling apps before the update in order to make the update procedure more safe. This can take a while...
No such app enabled: registration
forms 2.5.1 disabled
contacts 4.2.3 disabled
twofactor_totp 6.4.1 disabled
notify_push 0.5.0 disabled
apporder 0.15.0 disabled
drop_account 2.1.0 disabled
notes 4.5.1 disabled
impersonate 1.11.0 disabled
calendar 3.5.3 disabled
tasks 0.14.5 disabled
metadata 0.17.0 disabled
System config value app_install_overwrite deleted
calendar new version available: 3.5.4
calendar updated
Initializing nextcloud 25.0.2.3 ...
Initializing finished
Upgrading nextcloud from 24.0.8.2 to 25.0.2.3...
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Disabled incompatible app: accessibility
Disabled incompatible app: files_videoplayer
Updating <federation> ...
Updated <federation> to 1.15.0
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.13.0
Updating <oauth2> ...
Updated <oauth2> to 1.13.0
Updating <password_policy> ...
Updated <password_policy> to 1.15.0
Updating <files> ...
Updated <files> to 1.20.1
Updating <activity> ...
Updated <activity> to 2.17.0
Updating <circles> ...
Updated <circles> to 25.0.0
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.8.0
Updating <dav> ...
Fix broken values of calendar objects

 Starting ...
    0/0 [>---------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up

 Starting ...
    0/0 [->--------------------------]   0%
Updated <dav> to 1.24.0
Updating <files_sharing> ...
Updated <files_sharing> to 1.17.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.15.0
Updating <files_versions> ...
Updated <files_versions> to 1.18.0
Updating <sharebymail> ...
Updated <sharebymail> to 1.15.0
Updating <workflowengine> ...
Updated <workflowengine> to 2.7.0
Updating <admin_audit> ...
Updated <admin_audit> to 1.15.0
Updating <comments> ...
Updated <comments> to 1.15.0
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 2.14.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.14.0
Updating <notifications> ...
Updated <notifications> to 2.13.1
Updating <systemtags> ...
Updated <systemtags> to 1.15.0
Updating <theming> ...
Migrate old user accessibility config

 Starting ...
    0/0 [--->------------------------]   0%
Cleanup old theming cache

 Starting ...
 0/2 [>---------------------------]   0%
 Starting ...
 1/2 [==============>-------------]  50%
 Starting ...
 2/2 [============================] 100%
Updated <theming> to 2.0.1
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 1.6.0
Updating <dashboard> ...
Updated <dashboard> to 7.5.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.15.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.6.0
Updating <files_rightclick> ...
Updated <files_rightclick> to 1.4.0
Updating <logreader> ...
Updated <logreader> to 2.10.0
Updating <nextcloud-aio> ...
Updated <nextcloud-aio> to 0.3.0
Updating <photos> ...
Updated <photos> to 2.0.1
Updating <privacy> ...
Updated <privacy> to 1.9.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.15.0
Updating <recommendations> ...
Updated <recommendations> to 1.4.0
Updating <serverinfo> ...
Updated <serverinfo> to 1.15.0
Updating <settings> ...
Updated <settings> to 1.7.0
Updating <support> ...
Updated <support> to 1.8.0
Updating <survey_client> ...
Updated <survey_client> to 1.13.0
Updating <text> ...
Updated <text> to 3.6.0
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.14.0
Updating <user_status> ...
Updated <user_status> to 1.5.0
Updating <viewer> ...
Updated <viewer> to 1.9.0
Updating <weather_status> ...
Updated <weather_status> to 1.5.0
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
CacoCloud 25.0.2
Posting notifications to users that are admins...
Posting 'Nextcloud update to 25.0.2.3 successful!' to: admin
Done!
registration new version available: 2.0.0
registration updated
forms new version available: 3.0.2
forms updated
contacts new version available: 5.0.2
contacts updated
notes new version available: 4.6.0
notes updated
calendar new version available: 4.2.0
calendar updated
Restoring the status of apps. This can take a while...
Enabling notes...
Enabling calendar...
Enabling notify_push...
Enabling impersonate...
The impersonate app could not get enabled. Probably because it is not compatible with the new Nextcloud version.
Posting notifications to users that are admins...
Posting 'Could not enable the impersonate app after the Nextcloud update!' to: admin
Done!
Enabling tasks...
Enabling contacts...
Enabling forms...
Enabling apporder...
The apporder app could not get enabled. Probably because it is not compatible with the new Nextcloud version.
Posting notifications to users that are admins...
Posting 'Could not enable the apporder app after the Nextcloud update!' to: admin
Done!
Enabling drop_account...
Enabling twofactor_totp...
Enabling metadata...
Doing some optimizations...
 - Repair MySQL collation
     - Not a mysql database -> nothing to do
 - Repair mime types
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Repair invalid shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Migrate oauth2_clients table to nextcloud schema
     - Update the oauth2_access_tokens table schema.
     - Update the oauth2_clients table schema.
 - Fix potential broken mount points
     - No mounts updated
 - Repair language codes
 - Add log rotate job
 - Clear frontend caches
     - Image cache cleared
     - JS cache cleared
 - Clear every generated avatar on major updates
 - Add preview background cleanup job
 - Queue a one-time job to cleanup old backups of the updater
 - Cleanup invalid photocache files for carddav
 - Add background job to cleanup login flow v2 tokens
 - Remove potentially over exposing share links
     - No need to remove link shares.
 - Clear access cache of projects
 - Reset generated avatar flag
 - Keep legacy encryption enabled
 - Check encryption key format
 - Remove old dashboard app config data
 - Add job to cleanup the bruteforce entries
 - Queue a one-time job to check for user uploaded certificates
 - Repair DAV shares
 - Add background job to set the lookup server share state for users
 - Add token cleanup job
 - Clean up abandoned apps
 - Add possibly missing system config
 - Upgrading Circles App
 - Fix component of birthday calendars
     - 3 birthday calendars updated.
 - Regenerating birthday calendars to use new icons and fix old birthday events without year
     - Repair step already executed
 - Fix broken values of calendar objects
    0 [>---------------------------]
 - Registering building of calendar search index as background job
     - Repair step already executed
 - Register building of social profile search index as background job
 - Registering background jobs to update cache for webcal calendars
     - Added 0 background jobs to update webcal calendars
 - Registering building of calendar reminder index as background job
     - Repair step already executed
 - Clean up orphan event and contact data
     - 0 events without a calendar have been cleaned up
     - 0 properties without an events have been cleaned up
     - 0 changes without a calendar have been cleaned up
     - 0 cached events without a calendar subscription have been cleaned up
     - 0 changes without a calendar subscription have been cleaned up
     - 0 contacts without an addressbook have been cleaned up
     - 0 properties without a contact have been cleaned up
     - 0 changes without an addressbook have been cleaned up
 - Remove activity entries of private events
     - Removed 0 activity entries
 - Clean up old calendar subscriptions from deleted users that were not cleaned-up
    0 [->--------------------------]
     - 0 calendar subscriptions without an user have been cleaned up
 - Remove invalid object properties
     - 0 invalid object properties removed.
 - Fix the share type of guest shares when migrating from ownCloud
 - Copy the share password into the dedicated column
 - Set existing shares as accepted
 - Clean up meta table
 - Set binary permissions
 - Update OAuth token expiration times
 - Switches from default updater server to the customer one if a valid subscription is available
     - Repair step already executed
 - Send an admin notification if monthly report is disabled
 - Initialize migration of background images from dashboard to theming app
 - Cleanup old theming cache
    0 [--->------------------------]
 - Add background job to check for backup codes
 - Populating added database structures for workflows
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Check indices of the oc_preferences table.
Adding preferences_app_key index to the oc_preferences table, this can take some time...
oc_properties table updated successfully.
Check indices of the oc_mounts table.
Check columns of the comments table.
Done.
Check primary keys.
Done.
All tables already up to date!
mimetypelist.js is updated
Added mimetype "image/x-icon" to database
Added 1 new mimetypes
Updated 0 filecache rows
System config value tempdirectory set to string /mnt/ncdata/tmp/
Applying one-click-instance settings...
System config value one-click-instance set to boolean true
System config value one-click-instance.user-limit set to integer 100
System config value one-click-instance.link set to string https://nextcloud.com/all-in-one/
support already enabled
Adjusting log files...
System config value logfile set to string /var/www/html/data/nextcloud.log
Config value logfile for app admin_audit set to /var/www/html/data/audit.log
Applying network settings...
System config value trusted_domains => 1 set to string cloud.sloughland.dev
System config value overwrite.cli.url set to string https://cloud.sloughland.dev/
System config value htaccess.RewriteBase set to string /
.htaccess has been updated
System config value files_external_allow_create_new_local set to boolean false
System config value trusted_proxies => 0 set to string 127.0.0.1
System config value trusted_proxies => 1 set to string ::1
Config value base_endpoint for app notify_push set to https://cloud.sloughland.dev/push
System config value enabledPreviewProviders => 0 deleted
System config value preview_imaginary_url deleted
szaimen commented 1 year ago

Also looks good.

szaimen commented 1 year ago

I google a bit and it seems that somehow the proxy doesnt work in your case which should interpret the php filea that are present but somehow not interpreted. Are you sure thst there are not further error loga in the apache container logs?

Sid127 commented 1 year ago

I'm positive there's no further logging in apache container's logs.

szaimen commented 1 year ago

One additonal idea:

What is the output of

sudo docker exec -it nextcloud-aio-apache ls -l /etc/apache2/sites-enabled/

Sid127 commented 1 year ago
[botuser@archlinux ~]$ sudo docker exec -it nextcloud-aio-apache ls -l /etc/apache2/sites-enabled/
total 0
lrwxrwxrwx 1 root root 33 Jan  4 21:44 nextcloud.conf -> ../sites-available/nextcloud.conf
szaimen commented 1 year ago

Okay, and

sudo docker exec -it nextcloud-aio-apache cat /etc/apache2/sites-enabled/nextcloud.conf?

Sid127 commented 1 year ago
[botuser@archlinux ~]$ sudo docker exec -it nextcloud-aio-apache cat /etc/apache2/sites-enabled/nextcloud.conf
Listen 8000
<VirtualHost *:8000>
    ServerName localhost

    # Add error log
    CustomLog /proc/self/fd/1 combined
    ErrorLog /proc/self/fd/2

    # PHP match
    <FilesMatch "\.php$">
        SetHandler "proxy:fcgi://${NEXTCLOUD_HOST}:9000"
    </FilesMatch>
    # Nextcloud dir
    DocumentRoot /var/www/html/
    <Directory /var/www/html/>
        Options Indexes FollowSymLinks
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews
        Satisfy Any
        <IfModule mod_dav.c>
            Dav off
        </IfModule>
    </Directory>
    # Deny access to .ht files
    <Files ".ht*">
        Require all denied
    </Files>

    # Fix zero file sizes 
    # See https://github.com/nextcloud/server/issues/3056#issuecomment-954209565
    SetEnv proxy-sendcl 1

    # See https://httpd.apache.org/docs/current/en/mod/core.html#limitrequestbody
    LimitRequestBody ${APACHE_MAX_SIZE}

    # See https://httpd.apache.org/docs/current/mod/core.html#timeout
    Timeout ${APACHE_MAX_TIME}

    # See https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxytimeout
    ProxyTimeout ${APACHE_MAX_TIME}
</VirtualHost>
szaimen commented 1 year ago

Looks good as well.

Additional commands:

# Go into the container:
sudo docker exec -it nextcloud-aio-apache bash
# From inside the container:
echo $NEXTCLOUD_HOST
nc -z $NEXTCLOUD_HOST 9000; echo $?
exit
szaimen commented 1 year ago

Another question: is SELinux enabled on your host?

Sid127 commented 1 year ago

Nope, no SELinux, host is a vanilla Arch Linux installation, running headless

szaimen commented 1 year ago

Can you try this? https://github.com/nextcloud/all-in-one/issues/1760#issuecomment-1383113997

Sid127 commented 1 year ago

oh, right, sorry. Here you go

www-data@ccf12f366ba0:/$ echo $NEXTCLOUD_HOST
nextcloud-aio-nextcloud
www-data@ccf12f366ba0:/$ nc -z $NEXTCLOUD_HOST 9000; echo $?
0
szaimen commented 1 year ago

Okay, I am slowly running out of ideas. Everything looks good and how it is intended to work. Of course I also cannot reproduce your issue on my test instance which would make it easier to debug. So I suspect something ion your host or docker install not working correctly but no proof yet...

szaimen commented 1 year ago

Maybe one last idea for now: Can you run curl -L http://127.0.0.1:11000/index.php/login.php on your host?

Sid127 commented 1 year ago

this one actually returned HTML!

[botuser@archlinux ~]$ curl -L http://127.0.0.1:11000/index.php/login.php
<!DOCTYPE html>
<html>
<head>
    <script> window.location.href="index.php"; </script>
    <meta http-equiv="refresh" content="0; URL=index.php">
</head>
</html>
szaimen commented 1 year ago

Okay, so maybe the pretty urls do not work as intended...

Can you post the output of sudo docker exec -it nextcloud-aio-apache cat /var/www/html/.htaccess ?

Sid127 commented 1 year ago
[botuser@archlinux ~]$ sudo docker exec -it nextcloud-aio-apache cat /var/www/html/.htaccess
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####

ErrorDocument 403 /
ErrorDocument 404 /
<IfModule mod_rewrite.c>
  Options -MultiViews
  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
  RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4|mp3|ogg|wav|wasm|tflite)$
  RewriteCond %{REQUEST_FILENAME} !/core/ajax/update\.php
  RewriteCond %{REQUEST_FILENAME} !/core/img/(favicon\.ico|manifest\.json)$
  RewriteCond %{REQUEST_FILENAME} !/(cron|public|remote|status)\.php
  RewriteCond %{REQUEST_FILENAME} !/ocs/v(1|2)\.php
  RewriteCond %{REQUEST_FILENAME} !/robots\.txt
  RewriteCond %{REQUEST_FILENAME} !/(ocm-provider|ocs-provider|updater)/
  RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
  RewriteCond %{REQUEST_FILENAME} !/richdocumentscode(_arm64)?/proxy.php$
  RewriteRule . index.php [PT,E=PATH_INFO:$1]
  RewriteBase /
  <IfModule mod_env.c>
    SetEnv front_controller_active true
    <IfModule mod_dir.c>
      DirectorySlash off
    </IfModule>
  </IfModule>
</IfModule>
szaimen commented 1 year ago

Oh wow, so indeed is some important part of the .htaccess file missing in your case. Strange.

Can you try to restore a backup from before the update and check if that makes it work again and try to upgrade again?

Sid127 commented 1 year ago

Oh boy. I don't think I have a backup of my containers at the moment, since the VPS I'm running on has extremely limited storage. I could try switching to the beta channel, but I think beta and latest are the same at the moment?

I'm curious as to what htaccess is missing though, maybe I can frankenstein this by manually editing the htaccess file to fix what's missing?

szaimen commented 1 year ago

Honestly I usually refrain from helping people that do not have a backup since things can go wrong always and you are really irresponsible if you dont have one. That is also why we put an easy backup solution in place.

But you are lucky today and I'll send the correct htaccess file to you later. However since you don't have a backup, there is no guarentee that it will work afterwards.

Sid127 commented 1 year ago

Yeah, first thing I'm doing after this is getting a small storage bump on the VPS and getting into the habit of backing up before updates. Sorry for taking up so much of your time today, and thanks a ton. Hope you have a good Sunday

szaimen commented 1 year ago

Below is what needs to be in your .htaccess file. You can likely edit the file here: /var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/.htaccess

<IfModule mod_headers.c>
  <IfModule mod_setenvif.c>
    <IfModule mod_fcgid.c>
       SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
       RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
    </IfModule>
    <IfModule mod_proxy_fcgi.c>
       SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
    </IfModule>
    <IfModule mod_lsapi.c>
      SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
      RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
    </IfModule>
  </IfModule>

  <IfModule mod_env.c>
    # Add security and privacy related headers

    # Avoid doubled headers by unsetting headers in "onsuccess" table,
    # then add headers to "always" table: https://github.com/nextcloud/server/pull/19002
    Header onsuccess unset Referrer-Policy
    Header always set Referrer-Policy "no-referrer"

    Header onsuccess unset X-Content-Type-Options
    Header always set X-Content-Type-Options "nosniff"

    Header onsuccess unset X-Frame-Options
    Header always set X-Frame-Options "SAMEORIGIN"

    Header onsuccess unset X-Permitted-Cross-Domain-Policies
    Header always set X-Permitted-Cross-Domain-Policies "none"

    Header onsuccess unset X-Robots-Tag
    Header always set X-Robots-Tag "none"

    Header onsuccess unset X-XSS-Protection
    Header always set X-XSS-Protection "1; mode=block"

    SetEnv modHeadersAvailable true
  </IfModule>

  # Add cache control for static resources
  <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)$">
    Header set Cache-Control "max-age=15778463"
  </FilesMatch>

  <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)(\?v=.*)?$">
    Header set Cache-Control "max-age=15778463, immutable"
  </FilesMatch>

  # Let browsers cache WOFF files for a week
  <FilesMatch "\.woff2?$">
    Header set Cache-Control "max-age=604800"
  </FilesMatch>
</IfModule>

# PHP 7.x
<IfModule mod_php7.c>
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>

# PHP 8+
<IfModule mod_php.c>
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>

<IfModule mod_mime.c>
  AddType image/svg+xml svg svgz
  AddType application/wasm wasm
  AddEncoding gzip svgz
</IfModule>

<IfModule mod_dir.c>
  DirectoryIndex index.php index.html
</IfModule>

<IfModule pagespeed_module>
  ModPagespeed Off
</IfModule>

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{HTTP_USER_AGENT} DavClnt
  RewriteRule ^$ /remote.php/webdav/ [L,R=302]
  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
  RewriteRule ^remote/(.*) remote.php [QSA,L]
  RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L]
  RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

AddDefaultCharset utf-8
Options -Indexes
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####

ErrorDocument 403 /
ErrorDocument 404 /
<IfModule mod_rewrite.c>
  Options -MultiViews
  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
  RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4|mp3|ogg|wav|wasm|tflite)$
  RewriteCond %{REQUEST_FILENAME} !/core/ajax/update\.php
  RewriteCond %{REQUEST_FILENAME} !/core/img/(favicon\.ico|manifest\.json)$
  RewriteCond %{REQUEST_FILENAME} !/(cron|public|remote|status)\.php
  RewriteCond %{REQUEST_FILENAME} !/ocs/v(1|2)\.php
  RewriteCond %{REQUEST_FILENAME} !/robots\.txt
  RewriteCond %{REQUEST_FILENAME} !/(ocm-provider|ocs-provider|updater)/
  RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
  RewriteCond %{REQUEST_FILENAME} !/richdocumentscode(_arm64)?/proxy.php$
  RewriteRule . index.php [PT,E=PATH_INFO:$1]
  RewriteBase /
  <IfModule mod_env.c>
    SetEnv front_controller_active true
    <IfModule mod_dir.c>
      DirectorySlash off
    </IfModule>
  </IfModule>
</IfModule>
szaimen commented 1 year ago

Yeah, first thing I'm doing after this is getting a small storage bump on the VPS and getting into the habit of backing up before updates.

Good to hear that you get reasonable now!

Sid127 commented 1 year ago

It worked, thanks again! I'll be sure to get regular backups going in the future :)

szaimen commented 1 year ago

I'll be sure to get regular backups going in the future :)

Sounds good!

I'll move this to discussions so that people can find this solution if thsy should have the same problem in the future.