Yesterday I upgraded to 27 from 23, going one version at a time (i.e. 23->24, 24->25, 25->26, 26->27). I am running the stable-fpm version via Docker. To date, I have never had any issues but now, when I try to use the web interface, nothing works.
First, I couldn’t even see the login form. Then I changed the ContentSecurityPolicy.php file to include nextclound.mydomain.com in all the “allow” stanzas.
Now I can see the login form but it shows the {Product_name} placeholder instead of showing Nextcloud.
I cannot use the web interface to check the security settings (it just spins).
The weather won’t load (it just spins)
The Calendar won’t load (it just spins)
Changing anything in the admin console says error when I try to save.
Clicking on Apps just shows an empty page
Every page in the web interface shows
Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).
in console, and pages beyond login shows a bunch more errors
The strange thing is that because I use the iOS Calendar and Contacts apps (as well as the macOS Calendar and Address Book), all my data is sync’ing just fine, but I need to be able to use the web interface like I used to.
Looking at the nextcloud.log file I see this message over and over again:
{"reqId":"ZT4gHaXQpbRDxzNFHVIDIVHEI","level":0,"time":"2023-10-29T09:04:29+00:00","remoteAddr":"x.x.x.x","user":"--","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/calendars/myusername/","message":"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured","userAgent":"macOS/12.5.1 (21G83) CalendarAgent/961.4.2","version":"27.1.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\NotAuthenticated","Message":"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMethod:PROPFIND",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":365,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":172,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","Line":152,"message":"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured","exception":{},"CustomMessage":"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured"}}
I am running Apache and this is my vhost config:
<VirtualHost *:443>
DocumentRoot /var/www/html
ServerAdmin webmaster@mydomain.com
ServerName nextcloud.mydomain.com
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
SSLProxyEngine on
ProxyVia on
ProxyAddHeaders on
ProxyPreserveHost on
ErrorLog "/logs/nextcloud.mydomain.com-error_log"
CustomLog "/logs/nextcloud.mydomain.com-access_log" common
RewriteEngine On
RewriteRule ^/.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^/.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^/\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^/.well-known/webfinger /index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/.well-known/nodeinfo /index.php/.well-known/nodeinfo [R=301,L]
<Directory /web/letsencrypt>
AllowOverride All
Require all granted
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
<Directory /var/www/html>
AllowOverride All
Require all granted
</Directory>
SSLEngine on
SSLProtocol TLSv1.2
SSLHonorCipherOrder on
SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
RewriteRule /.well-known/acme-challenge/ - [R,L]
Alias /.well-known/acme-challenge /letsencrypt/.well-known/acme-challenge
<Directory /letsencrypt>
Require all granted
</Directory>
SSLCertificateFile "/etc/letsencrypt/live/nextcloud.mydomain.com/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/nextcloud.mydomain.com/privkey.pem"
<FilesMatch "\.(php|phar)$">
SetHandler "proxy:fcgi://nextcloud:9000"
</FilesMatch>
DirectoryIndex /index.php index.php
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "/logs/ssl_request_log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
This is my config.php file
<?php
$CONFIG = array (
'debug' => false,
'htaccess.RewriteBase' => '/',
'instanceid' => 'xxxxx',
'passwordsalt' => 'xxxxx',
'secret' => 'xxxxx',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'nextcloud.mydomain.com',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'pgsql',
'version' => '27.1.3.2',
'overwrite.cli.url' => 'https://nextcloud.mydomain.com',
'overwriteprotocol' => 'https',
'dbname' => 'mynextcloud',
'dbhost' => 'postgres:1234',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => 'xxxxx',
'installed' => true,
'default_language' => 'en',
'default_locale' => 'en_US',
'default_phone_region' => 'US',
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\Memcached',
'memcached_servers' =>
array (
0 =>
array (
0 => 'nextcloud_memcached',
1 => 11211,
),
),
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'maintenance' => false,
'theme' => '',
'logfile' => '/var/www/html/data/nextcloud.log',
'loglevel' => 0,
'log_rotate_size' => 104857600,
'data-fingerprint' => 'xxxxx',
'mail_from_address' => 'webmaster',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'mydomain.com',
'mail_smtphost' => 'mail.mydomain.com',
'mail_smtpport' => '587',
'mail_smtpauthtype' => 'PLAIN',
'mail_smtpauth' => 1,
'mail_smtpname' => 'user@mydomain.com',
'mail_smtppassword' => 'xxxxx',
'mail_smtpsecure' => 'tls',
);
Note: I have redacted all sensitive information from this post.
Would love to get this back and working and could really use some guidance. Thanks!