The Basics
- Nextcloud Server version:
31.0.7
- Operating system and version:
Debian 12
- Web server and version :
Apache 2.4.62
- Reverse proxy and version:
nginx 1.28
- PHP version:
8.3.24
- Is this the first time you’ve seen this error?:
Yep
- When did this problem seem to first start?
When upgrading to NC 31
- Installation method
CLI upgrade
- Are you using CloudfIare, mod_security, or similar?
Yep
Summary of the issue you are facing:
When opening (trying at least) a file for editing NC shows
The document failed to load
The WOPI host is not authorized. Please try again later and inform the systems staff if the problem persists.
Also, browser console shows this two Configuration Security Policies, one after the other. AFAIK, this produce and intersection.
media-src 'self' https://odf.dominio.edu.ar; object-src 'self' blob:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; frame-ancestors odf.dominio.edu.ar:* enlinea.dominio.edu.ar:*; img-src 'self' data: https://www.collaboraoffice.com/ odf.dominio.edu.ar:* enlinea.dominio.edu.ar:*; connect-src 'self' https://www.zotero.org https://api.zotero.org wss://odf.dominio.edu.ar https://odf.dominio.edu.ar; frame-src 'self' https://nextcloud.com/pricing blob:; font-src 'self' data:; default-src 'none';
and
default-src 'self' https: data: 'unsafe-inline' 'unsafe-eval'; connect-src 'self' https: wss:;
Any enlightening ideas are more than welcome.
Configuration
Nextcloud
The output of occ config:list system
:
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"enlinea.dominio.edu.ar"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"0": "skeletondiretory\u2019 => \u2018\/var\/www\/nextcloud\/core\/skeleton",
"dbtype": "mysql",
"version": "31.0.7.1",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"overwritehost": "enlinea.dominio.edu.ar",
"overwriteprotocol": "https",
"overwritecondaddr": "^10\\.8\\.9\\.101$",
"overwrite.cli.url": "https:\/\/enlinea.dominio.edu.ar",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR"
],
"htaccess.RewriteBase": "\/",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"theme": "",
"force_language": "es",
"force_locale": "es",
"default_phone_region": "ar",
"mysql.utf8mb4": true,
"mail_smtpmode": "smtp",
"mail_smtpsecure": "tls",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\APCu",
"content_security_policy": [
"default-src https: data: 'unsafe-inline' 'unsafe-eval'",
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https:\/\/enlinea.dominio.edu.ar https:\/\/odf.dominio.edu.ar",
"style-src 'self' 'unsafe-inline' https:\/\/enlinea.dominio.edu.ar https:\/\/odf.dominio.edu.ar",
"img-src 'self' data: blob: https:\/\/enlinea.dominio.edu.ar https:\/\/odf.dominio.edu.ar",
"font-src 'self' data: https:\/\/enlinea.dominio.edu.ar https:\/\/odf.dominio.edu.ar",
"connect-src 'self' https:\/\/enlinea.dominio.edu.ar https:\/\/odf.dominio.edu.ar wss:\/\/odf.dominio.edu.ar",
"frame-src https:\/\/enlinea.dominio.edu.ar https:\/\/odf.dominio.edu.ar",
"frame-ancestors 'self' https:\/\/enlinea.dominio.edu.ar https:\/\/odf.dominio.edu.ar",
"media-src 'self' data: https:\/\/enlinea.dominio.edu.ar https:\/\/odf.dominio.edu.ar",
"object-src 'none'",
"base-uri 'self' https:\/\/enlinea.dominio.edu.ar"
],
"app_install_overwrite": [
"epubreader",
"integration_moodle",
"ransomware_protection",
"richdocuments",
"maps",
"groupfolders",
"gdatavaas",
"quicknotes",
"electronicsignatures"
],
"preview_max_x": "512",
"preview_max_y": "512",
"jpeg_quality": "60",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"maintenance_window_start": 1,
"logtimezone": "America\/Argentina\/Buenos_Aires",
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"logfile_audit": "\/var\/log\/nextcloud\/audit.log",
"log.condition": {
"apps": [
"admin_audit"
]
},
"log_query": false,
"loglevel": 3,
"log_rotate_size": 0
}
}
Apps
Enabled
- activity: 4.0.0
- analytics: 5.8.0
- announcementcenter: 7.1.4
- app_api: 5.0.2
- audioplayer: 3.5.1
- bookmarks: 15.1.3
- bruteforcesettings: 4.0.0
- calendar: 5.3.9
- circles: 31.0.0
- cloud_federation_api: 1.14.0
- comments: 1.21.0
- contactsinteraction: 1.12.0
- context_chat: 4.4.1
- dashboard: 7.11.0
- dav: 1.33.0
- deck: 1.15.2
- dicomviewer: 2.3.1
- federatedfilesharing: 1.21.0
- federation: 1.21.0
- files: 2.3.1
- files_downloadlimit: 4.0.0
- files_pdfviewer: 4.0.0
- files_reminders: 1.4.0
- files_sharing: 1.23.1
- files_trashbin: 1.21.0
- files_versions: 1.24.0
- forms: 5.1.2
- google_synchronization: 3.2.0
- groupfolders: 19.1.3
- integration_google: 4.1.0
- jitsi: 0.19.0
- logreader: 4.0.0
- lookup_server_connector: 1.19.0
- maps: 1.6.0
- music: 2.2.0
- notifications: 4.0.0
- oauth2: 1.19.1
- password_policy: 3.0.0
- photos: 4.0.0
- privacy: 3.0.0
- profile: 1.0.0
- provisioning_api: 1.21.0
- quicknotes: 0.8.30
- recommendations: 4.0.0
- related_resources: 2.0.0
- richdocuments: 8.7.4
- riotchat: 0.19.0
- serverinfo: 3.0.0
- settings: 1.14.0
- support: 3.0.0
- survey_client: 3.0.0
- suspicious_login: 9.0.1
- systemtags: 1.21.1
- text: 5.0.0
- theming: 2.6.1
- twofactor_backupcodes: 1.20.0
- twofactor_totp: 13.0.0-dev.0
- updatenotification: 1.21.0
- user_status: 1.11.0
- viewer: 4.0.0
- weather_status: 1.11.0
- webhook_listeners: 1.2.0
- workflowengine: 2.13.0
Disabled: - admin_audit: 1.21.0
- electronicsignatures: 3.0.5 (installed 3.0.5)
- encryption: 2.19.0
- files_external: 1.23.0
- firstrunwizard: 4.0.0 (installed 2.13.0)
- gdatavaas: 31.0.6 (installed 31.0.6)
- libresign: 11.2.5 (installed 11.2.5)
- nextcloud_announcements: 3.0.0 (installed 1.9.0)
- openotp_sign: 1.31.0 (installed 1.31.0)
- sharebymail: 1.21.0 (installed 1.14.0)
- twofactor_nextcloud_notification: 5.0.0
- user_ldap: 1.22.0
- video_converter: 1.0.6 (installed 1.0.6)
Additional info
- https://odf.dominio.edu.ar host is behind an nginx reverse proxy working as SSL termination
- https://odf.dominio.edu.ar/hosting/discovery/ shows WOPI response over https
- https://odf.dominio.edu.ar/hosting/capabilities show service availabilty
- https://odf.dominio.edu.ar is defined as WOPI server in richdocuments
occ config:app:get richdocuments wopi_allowlist
https://odf.dominio.edu.ar https://enlinea.dominio.edu.ar
occ config:app:get richdocuments wopi_url
https://odf.dominio.edu.ar