Troube with custom_app directory

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5):
Operating system and version (eg, Ubuntu 20.04): docker on TrueNAS scale 22.02.1
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.21.6 via bitnami/nginx image
PHP version (eg, 7.4): 8.0.19 via nextcloud/nextcloud:fpm image

The issue you are facing:
To be short, I cannot visit any custom app, and I edit the config.php to modify the path of custom app, then I cannot visit my whole server.

I can download, enable or disable custom app. App icon appeard on the top menu bar after enabling, but the icon is missed. And all custom app showing totally blank in both their pages and setting pages. Development tools of chrome tell me:(Screenshot here

Refused to apply style from ‘xxx’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.

But official app is normal, so I’m wondering if the custom app directory is the problem. So I followed this to edit my config.php:

‘apps_paths’ =>
array (
0 =>
array (
‘path’ => ‘/var/www/html/apps’,
‘url’ => ‘/apps’,
‘writable’ => false,
1 =>
array (
‘path’ => ‘/var/www/html/apps2’,
‘url’ => ‘/apps2’,
‘writable’ => true,

And the I delete the “/var/www/html/custom_apps” and create “/var/www/html/apps2” . Then I met this:

App directory “/var/www/html/custom_apps” not found! Please put the Nextcloud apps folder in the Nextcloud folder. You can also configure the location in the config.php file.

I restart the nginx container and nextcloud container, not work. I re-create a folder named “custom_apps” then I can visit my nextcloud server. But it’s wired, right? I have edited the config.php! Why the server still want the original folder?

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it: As above.

The output of your Nextcloud log in Admin > Logging:

Nothing about this. I empty the log and refresh the page, no new log genereted.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'xxx',
    'port' => xxx,
    'password' => 'xxx',
  'filelocking.enabled' => 'true',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    1 => 
    array (
      'path' => '/var/www/html/apps2',
      'url' => '/apps2',
      'writable' => true,
  'trusted_domains' => 
  array (
    0 => 'xxx',
  'datadirectory' => '/var/www/html/data',
  'overwrite.cli.url' => 'xxx',
  'default_phone_region' => 'CN',
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'xxx',
  'dbhost' => 'xxx',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'proxy' => 'xxx',

The output of your Apache/nginx/system log in /var/log/____:

Nothing about this. I empty the log and refresh the page, no new log genereted.

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.

Nothing about this. I empty the log and refresh the page, no new log genereted.

Maybe you can search the problem in the internet: is not a supported stylesheet MIME type, and strict MIME checking is enabled

Read this solution. Maybe you can also deactivate “strict MIME checking”. Search the internet.

If it not works please change language to english and reapeat your screenshot. Thanks.

@devnull Thanks for your reply, but this has nothing to do with “strict MIME checking”. I’ve spent days on searching this issue, and yes I have tried to turn off “strict MIME checking” in nginx.conf before, but nothing worked. Finally I suspected that it was a path problem, so I changed the custom_app path in config.php.

I moved the folder in /var/www/html/custom_apps to /var/www/html/apps and the apps were loaded normally, which confirmed my suspicions.

My nginx configuration file is referenced from the official latest manual, and I think that some location rules of nginx may have caused the custom_apps folder to be filtered out incorrectly.

Maybe I should post an issue for this in github:

  1. the custom_apps folder is not correctly parsed by the web server.
  2. changing the path of custom_apps in config.php does not work.