Nextcloud version (eg, 20.0.5): 25.03
Operating system and version (eg, Ubuntu 20.04): Linux 5.4.0-42-generic x86_64
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.4
The issue you are facing: Nextcloud is behind reverseproxy (Bluecoat) and, other network access, the files app doesn’t work (Forbidden access). Same issue with the android app
Is this the first time you’ve seen this error? (Y/N): multiples installations, but same issue
The output of your Nextcloud log in Admin > Logging:
not error
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',
1 => 'X.X.X.X',
2 => 'nextcloud.domain.fr',
),
'datadirectory' => '/mnt/ncdata',
'dbtype' => 'pgsql',
'version' => '25.0.3.2',
'overwrite.cli.url' => 'https://nextcloud.domain.fr',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud_db',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '*********',
'dbpassword' => '******',
'installed' => true,
'instanceid' => '***********',
'log_type' => 'file',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'loglevel' => '0',
'log.condition' =>
array (
'apps' =>
array (
0 => 'admin_audit',
),
),
'mail_smtpmode' => 'smtp',
'logtimezone' => 'Etc/UTC',
'maintenance' => false,
'trusted_proxies' =>
array (
0 => 'X.X.X.X',
),
'updater.secret' => '*********',
'theme' => '',
);
The output of your Apache/nginx/system log in /var/log/apache2/
:
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:05 +0000] "GET /status.php HTTP/1.1" 200 4616 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.23.1"
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:05 +0000] "GET /ocs/v2.php/cloud/capabilities?format=json HTTP/1.1" 200 5434 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.23.1"
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:06 +0000] "GET /ocs/v2.php/apps/user_status/api/v1/predefined_statuses?format=json HTTP/1.1" 200 1958 "-" "Mozilla/5.0 (Android)>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:06 +0000] "GET /ocs/v2.php/cloud/user?format=json HTTP/1.1" 200 2134 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.23.1"
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:25 +0000] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1238 "-" "Mozilla/5.0 (Windows NT 10.0; W>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:25 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 2310 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; >
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:25 +0000] "GET /index.php/csrftoken HTTP/1.1" 200 1254 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:25 +0000] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1029 "-" "Mozilla/5.0 (Windows NT 10.0; W>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:25 +0000] "GET /index.php/csrftoken HTTP/1.1" 200 1029 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:32 +0000] "GET /index.php/apps/files/ HTTP/1.1" 200 12704 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:33 +0000] "GET /index.php/core/js/oc.js?v=a7a08602 HTTP/1.1" 200 4794 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:33 +0000] "GET /apps/files_sharing/css/icons.css.map HTTP/1.1" 200 805 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKi>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:33 +0000] "GET /apps/user_status/css/user-status-menu.css.map HTTP/1.1" 200 1046 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) >
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:33 +0000] "GET /apps/files/css/merged.css.map HTTP/1.1" 200 2182 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:33 +0000] "GET /core/css/server.css.map HTTP/1.1" 200 3951 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KH>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:34 +0000] "GET /ocs/v2.php/search/providers?from=%2Fapps%2Ffiles%2F HTTP/1.1" 200 1205 "-" "Mozilla/5.0 (Windows NT 10.0; Win64;>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:37 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 2101 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; >
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:37 +0000] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1029 "-" "Mozilla/5.0 (Windows NT 10.0; W>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:38 +0000] "GET /index.php/apps/files_sharing/api/externalShares HTTP/1.1" 200 933 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:38 +0000] "GET /ocs/v2.php/core/whatsnew?format=json HTTP/1.1" 204 1046 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebK>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:39 +0000] "GET /ocs/v2.php/apps/text/workspace?path=%2F HTTP/1.1" 404 1045 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleW>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:39 +0000] "GET /index.php/apps/systemtags/lastused HTTP/1.1" 200 1142 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit>
nextcloud.domain.fr:443 X.X.X.X - - [21/Feb/2023:09:06:39 +0000] "GET /index.php/apps/recommendations/api/recommendations HTTP/1.1" 200 1285 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; >
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
>
{"reqId":"UFo9p5icApl6Kg13q6MY","level":1,"time":"2023-02-21T09:10:07+00:00","remoteAddr":"192.168.1.254","user":"nextcloud","app":"no app in context","method":"GET","url":"/ocs/v2.php/app>
{"reqId":"CuZadN5DExYG2kztk2Xw","level":1,"time":"2023-02-21T09:10:07+00:00","remoteAddr":"192.168.1.254","user":"nextcloud","app":"no app in context","method":"GET","url":"/index.php/apps>
VHOST Apache :
<VirtualHost *:80>
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST} [R=301,L]
</VirtualHost>
<VirtualHost *:443>
Header add Strict-Transport-Security: "max-age=15768000;includeSubdomains"
SSLEngine on
### YOUR SERVER ADDRESS ###
ServerAdmin admin@example.com
ServerName nextcloud.domain.fr
### SETTINGS ###
<FilesMatch "\.php$">
SetHandler "proxy:unix:/run/php/php7.4-fpm.nextcloud.sock|fcgi://127.0.0.1"
</FilesMatch>
DocumentRoot /var/www/nextcloud
<Directory /var/www/nextcloud>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Satisfy Any
</Directory>
<IfModule mod_dav.c>
Dav off
</IfModule>
<Directory "/mnt/ncdata">
# just in case if .htaccess gets disabled
Require all denied
</Directory>
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
<Files ".ht*">
Require all denied
</Files>
# Disable HTTP TRACE method.
TraceEnable off
# Disable HTTP TRACK method.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACK
RewriteRule .* - [R=405,L]
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
# Avoid "Sabre\DAV\Exception\BadRequest: expected filesize XXXX got XXXX"
<IfModule mod_reqtimeout.c>
RequestReadTimeout body=0
</IfModule>
### LOCATION OF CERT FILES ###
SSLCertificateFile /etc/ssl/certs/cert.pem
SSLCertificateKeyFile /etc/ssl/private/private.key
</VirtualHost>
Thanks in advance