I’ve just set up a fresh Nextcloud instance using Docker with nextcloud:18.0.4
+ PostgreSQL + traefik and I’m unable to configure group folders.
When opening “Settings -> Group Folders”, the console shows
The resource from “https://mydomain.com/apps/files/” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Consequently, creating a new group folder doesn’t actually do anything.
Other apps, such as Mail and Notes work just fine, and without any errors printed to the console.
Nextcloud setup
docker-compose.yml
version: '3.3'
volumes:
nextcloud-www:
driver: local
nextcloud-db:
driver: local
redis:
driver: local
letsencrypt:
driver: local
services:
traefik:
image: 'traefik:v2.2'
container_name: traefik
restart: always
command:
- '--log.level=DEBUG'
- '--api.insecure=true'
- '--providers.docker=true'
- '--providers.docker.exposedbydefault=true'
- '--entrypoints.web.address=:80'
- '--entrypoints.websecure.address=:443'
- '--entrypoints.web.http.redirections.entryPoint.to=websecure'
- '--entrypoints.web.http.redirections.entryPoint.scheme=https'
- '--certificatesresolvers.myresolver.acme.httpchallenge=true'
- '--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web'
- '--certificatesresolvers.myresolver.acme.email=me@mydomain.com'
- '--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json'
ports:
- '80:80'
- '443:443'
networks:
- nextcloud
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- 'letsencrypt:/letsencrypt'
db:
restart: always
image: 'postgres:11-alpine'
networks:
- nextcloud
env_file:
- db.env
volumes:
- 'nextcloud-db:/var/lib/postgresql/data'
redis:
image: 'redis:6-alpine'
restart: always
networks:
- nextcloud
volumes:
- 'redis:/var/lib/redis'
nextcloud:
image: 'nextcloud:18.0.4'
restart: always
networks:
- nextcloud
depends_on:
- redis
- db
labels:
- 'traefik.http.routers.nextcloud.middlewares=nextcloud,nextcloud_redirect'
- traefik.http.routers.nextcloud.tls.certresolver=myresolver
- traefik.http.routers.nextcloud.rule=Host(`mydomain.com`)
- >-
traefik.http.middlewares.nextcloud.headers.contentSecurityPolicy=frame-ancestors
'self' mydomain.com *.mydomain.com
- traefik.http.middlewares.nextcloud.headers.stsSeconds=155520011
- traefik.http.middlewares.nextcloud.headers.stsIncludeSubdomains=true
- traefik.http.middlewares.nextcloud.headers.stsPreload=true
- >-
traefik.http.middlewares.nextcloud_redirect.redirectregex.regex=/.well-known/(card|cal)dav
- >-
traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement=/remote.php/dav/
env_file:
- db.env
environment:
- REDIS_HOST=redis
- NEXTCLOUD_TRUSTED_DOMAINS=mydomain.com
- TRUSTED_PROXIES=172.18.0.0/16
volumes:
- 'nextcloud-www:/var/www/html'
networks:
nextcloud:
external: true
config.php
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'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,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'redis',
'password' => false,
'port' => 6379,
),
'trusted_proxies' =>
array (
0 => '172.18.0.0/16',
),
'passwordsalt' => '',
'secret' => '',
'trusted_domains' =>
array (
0 => 'mydomain.com',
1 => 'myserver',
2 => 'localhost',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'pgsql',
'version' => '18.0.4.2',
'overwrite.cli.url' => 'https://mydomain.com',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => 'db',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin',
'dbpassword' => '',
'installed' => true,
'instanceid' => 'ocxroeppudsk',
'mail_smtpmode' => 'smtp',
'mail_smtpauthtype' => 'PLAIN',
'mail_sendmailmode' => 'smtp',
'mail_smtpauth' => 1,
'mail_from_address' => 'no-reply',
'mail_domain' => 'mydomain.com',
'mail_smtphost' => 'smtp.mydomain.com',
'mail_smtpport' => '587',
'mail_smtpname' => '',
'mail_smtppassword' => '',
'mail_smtpsecure' => 'tls',
);
What I’ve tried
I’ve looked at similar issues, but none of their solutions helped in my case:
MIME type issues
"/apps/files" blocked due to MIME type [Solved]
I verified correct permissions:
ls -l /var/www/
drwxr-xr-x 43 www-data root 4096 Jun 3 14:24 apps
# (same for all the other directories)
ls -l /var/www/apps/
drwxr-xr-x 11 www-data root 4096 Jun 3 14:24 files
# (same for all the other directories)
[SOLVED] All extra apps fails to load due to MIME type mismatch
I’m not using nginx, but the default Docker image.
Group folder issues
Group folders App doesn't work anymore - does not create new group folder
Issue description is very similar, but I could reproduce the problem without any add-ons on both Firefox and Chrome
https://github.com/nextcloud/groupfolders/issues/932
I have disabled all extensions.
https://github.com/nextcloud/groupfolders/issues/580
Screenshot not applicable (interface displays fine for me), has no documented solution.
Additional information
Browsers
Firefox: 77.0.1 (64-bit)
Chrome: Version 83.0.4103.97 (Official Build) (64-bit)
Debugging information
- Version numbers
- Nextcloud: 18.0.4
- Group folders: 6.0.6
- The shown origin of the error is https://mydomain.com/settings/admin/groupfolders
- The recognized MIME type is
text/html
- No errors are logged to nextcloud.log, Apache’s logs or traefik’s
Network tab:
Firefox console:
Page screenshot:
Thank you in advance for your help!