Server: apps_paths doesn'tt seem to work properly

Created on 16 Jun 2016  路  7Comments  路  Source: nextcloud/server

Hello,

I'm trying to configure apps_paths to put the apps in a separated folder.

Steps to reproduce

https://docs.nextcloud.org/server/9/admin_manual/installation/apps_management_installation.html#using-custom-app-directories

Expected behaviour

Use calendar(|contacts|tasks) normally.

Actual behaviour

It doesn't seem to take into account the URL given in config.php, it is still /apps instead of /my. And of course the application doesn't work. The calendar area is empty and the sidebar is like JS doesn't work.

screenshot

Server configuration

Operating system: Debian 8.5

Web server: Apache 2.4.10

Database: MariaDB 10.1.14

PHP version: PHP 7.0.7

Nextcloud version: 9.0.50

Updated from an older Nextcloud/ownCloud or fresh install: migration from owncloud 9.0

Where did you install Nextcloud from: downloaded archive

Signing status (Nextcloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - admin_audit: 1.0.0
  - calendar: true
  - comments: 0.2
  - dav: 0.1.6
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - encryption
  - external
  - files_external
  - gallery
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "updatechecker": false,
        "instanceid": "ocy8xc3jyqh5",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.karolak.fr"
        ],
        "datadirectory": "\/home\/nextcloud\/data",
        "overwrite.cli.url": "https:\/\/cloud.karolak.fr",
        "dbtype": "mysql",
        "version": "9.0.50.0",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "debug": false,
        "filelocking.enabled": true,
        "logtimezone": "Europe\/Paris",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_from_address": "no-reply",
        "mail_domain": "karolak.fr",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "mail.karolak.fr",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "\/var\/run\/redis\/redis.sock",
            "port": 0,
            "timeout": 0
        },
        "theme": "",
        "loglevel": 2,
        "asset-pipeline.enabled": false,
        "log_type": "syslog",
        "htaccess.RewriteBase": "\/",
        "apps_paths": [
            {
                "path": "\/home\/nextcloud\/www\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/home\/nextcloud\/apps",
                "url": "\/my",
                "writable": true
            }
        ]
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Logs

Web server error log

no errors

Nextcloud log (data/owncloud.log)

no errors

Browser log

La feuille de style https://cloud.karolak.fr/index.php/apps/files/ n鈥檃 pas 茅t茅 charg茅e car son type MIME, 芦 text/html 禄, n鈥檈st pas 芦 text/css 禄. calendar
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
Content Security Policy: Les param猫tres de la page ont emp锚ch茅 le chargement d鈥檜ne ressource 脿 self (芦 script-src https://cloud.karolak.fr 'unsafe-eval' 禄). calendar
SyntaxError: expected expression, got '<' fr.js:1:0
SyntaxError: expected expression, got '<' jquery.ui.timepicker.js:1:0
SyntaxError: expected expression, got '<' ical.js:1:0
SyntaxError: expected expression, got '<' jstz.min.js:1:0
SyntaxError: expected expression, got '<' angular.js:1:0
SyntaxError: expected expression, got '<' angular-route.js:1:0
SyntaxError: expected expression, got '<' ui-bootstrap.min.js:1:0
SyntaxError: expected expression, got '<' ui-bootstrap-tpls.min.js:1:0
SyntaxError: expected expression, got '<' calendar.js:1:0
SyntaxError: expected expression, got '<' fullcalendar.js:1:0
SyntaxError: expected expression, got '<' lang-all.js:1:0
SyntaxError: expected expression, got '<' client.js:1:0
SyntaxError: expected expression, got '<' app.js:1:0
0. Needs triage

Most helpful comment

May be it should be said in the documentation that you cannot put apps folder outside the webroot.

All 7 comments

@LukasReschke didn't you refactored the app loading? Is this still supported?

"apps_paths": [
            {
                "path": "\/home\/nextcloud\/www\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/home\/nextcloud\/apps",
                "url": "\/my",
                "writable": true
            }
        ]

This looks also weird because the app directory is outside of the server root and then can't load the static assets. 馃槙

I can try to put my custom apps folder in the server root to see if it change something. Is it useful ?

To be honest, I really doubt that whole app paths thingy. It's just as fragile as moving the third-party folder...

And yes: Please try to use another folder reachable in your web root. That said: I wouldn't expect this feature to be as rock solid as you might expect. Better go with the default :wink:

I just tested on a fresh install, inside the server root and it works. Also i don't know if it's normal, but the URL is always apps (don't know the purpose of url parameter).

"apps_paths": [
            {
                "path": "\/var\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/nextcloud\/apps2",
                "url": "\/apps2",
                "writable": true
            }
        ]

Outside it still doesn't work.

I will go with the default i'm fine with it, but it could have been nice to "outsource" the apps folder :-)

May be it should be said in the documentation that you cannot put apps folder outside the webroot.

Was this page helpful?
0 / 5 - 0 ratings