Config.php missing (Trusted Domains)

Hi everyone,

Been having trouble lately with a few things, Firstly is the trusted domains.
Currently I manually installed nextcloud 21 and been having trouble locating trusted domain config.php file.
Before this I was using nextcloud 20 snap which had everything but it seems some of those file path is not the same for those who underwent manual installation rather than snap installation.

refer screenshot below for your reference:
image

Thanks,
Hakim

Hi @Hakim, if you have installed nextcloud from the zip file, your config.php is here: /var/www/nextcloud/config/config.php

Hi @Mageunic,

currently I cannot open “nextcloud” directory, it says permission denied. ill change the permission and get back to you.

Best Regards,
Hakim

Hi @Mageunic,

I manage to access to config.php and added the domain in trusted domain list. Can I ask for extra enquiry, I’m currently struggling on a few things on this:

  • PHP memory limit below recommendation.
  • memory cache configuration to enhance performance
  • php-imagick in this instance has no SVG support.

Looking forward to your reply.

Best Regards,
Hakim

Hi @Hakim ,
To fix php memory limit :

  • edit this file : /etc/php/7.4/apache2/php.ini ( maybe modify 7.4 by your version of php )
    ctrl+w > memory : set the value to 512M ( if you don’t have much Ram < 1GB ignore this ‘error’)

For memory cache see this link and choose th method you want : Memory caching — Nextcloud latest Administration Manual latest documentation

In my case, I use redis, here is the line to add in your config.php after install redis-server php-redis :

‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
),

for php-imagick ( this not a big issue but if you want to use svg file do this ) :
sudo apt-get install imagemagick

Best Regards,
Mageunic

Hi @mageunic,

After installing redis and making changes to the config.php file and configure memory limit in php.ini is there any service I should restart beside apache2? because after I restart the apache 2 my web server is down.

Best regards,
Hakim.

Hi @mageunic,

My apache2 is running but im unable to access the nextcloud.
Below are some screenshot for your reference.

apache 2 status.

php.ini.
image

config.php.
image

Thanks,
Hakim

Hi @Hakim, which error do you have?? Have you some log? ( see nextcloud.log into data directory)
Replace 1gb by 512 M maybe it resolve an error of a php.

Hi @Mageunic,

it seems i cannot access at all.
image

From the logs it only show yesterday’s logs

im not sure where to look at now.

Best regards,
Hakim

Hi @mageunic,

I wanna to know where should i verify the port for redis or is it default?
looking forward for your reply.

Thanks,
Hakim

@Hakim maybe delete the line for redis in your config.php. In the line I send you yesterday the default port is used.

You can modify the port in redis.conf :
sudo nano /etc/redis/redis.conf

In the screenshot you have send, I cannot see the all error message.

Hi @Mageunic,

I tried revert the changes on config.php for redis but still have this issue.
All the logs seems to be yesterdays log, any changes made today did not reflect on the logs.
Please refer below for logs.

{"reqId":"nrNFo5EuLxNqUUqtDkWb","level":3,"time":"2021-03-29T03:48:04+00:00","remoteAddr":"192.168.10.92","user":"Hakim","app":"no app in context","method":"POST","url":"/index.php/settings/apps/enable","message":{"Exception":"Error","Message":"Call to a member function getContainer() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":143,"function":"delegateContainerRegistrations","class":"OC\\AppFramework\\Bootstrap\\RegistrationContext","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":86,"function":"registerApps","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Installer.php","line":146,"function":"runLazyRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/RegistrationContext.php","Line":405,"CustomMessage":"Error during service alias registration of files_trashbin: Call to a member function getContainer() on null"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.0.18"}
{"reqId":"nrNFo5EuLxNqUUqtDkWb","level":3,"time":"2021-03-29T03:48:04+00:00","remoteAddr":"192.168.10.92","user":"Hakim","app":"PHP","method":"POST","url":"/index.php/settings/apps/enable","message":{"Exception":"Error","Message":"Undefined index: settings at /var/www/nextcloud/lib/private/AppFramework/Bootstrap/RegistrationContext.php#404","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/RegistrationContext.php","line":404,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":143,"function":"delegateContainerRegistrations","class":"OC\\AppFramework\\Bootstrap\\RegistrationContext","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":86,"function":"registerApps","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Installer.php","line":146,"function":"runLazyRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.0.18"}
{"reqId":"nrNFo5EuLxNqUUqtDkWb","level":3,"time":"2021-03-29T03:48:04+00:00","remoteAddr":"192.168.10.92","user":"Hakim","app":"no app in context","method":"POST","url":"/index.php/settings/apps/enable","message":{"Exception":"Error","Message":"Call to a member function getContainer() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":143,"function":"delegateContainerRegistrations","class":"OC\\AppFramework\\Bootstrap\\RegistrationContext","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":86,"function":"registerApps","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Installer.php","line":146,"function":"runLazyRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/RegistrationContext.php","Line":405,"CustomMessage":"Error during service alias registration of settings: Call to a member function getContainer() on null"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.0.18"}
{"reqId":"nrNFo5EuLxNqUUqtDkWb","level":3,"time":"2021-03-29T03:48:04+00:00","remoteAddr":"192.168.10.92","user":"Hakim","app":"PHP","method":"POST","url":"/index.php/settings/apps/enable","message":{"Exception":"Error","Message":"Undefined index: workflowengine at /var/www/nextcloud/lib/private/AppFramework/Bootstrap/RegistrationContext.php#404","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/RegistrationContext.php","line":404,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":143,"function":"delegateContainerRegistrations","class":"OC\\AppFramework\\Bootstrap\\RegistrationContext","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":86,"function":"registerApps","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Installer.php","line":146,"function":"runLazyRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.0.18"}
{"reqId":"nrNFo5EuLxNqUUqtDkWb","level":3,"time":"2021-03-29T03:48:04+00:00","remoteAddr":"192.168.10.92","user":"Hakim","app":"no app in context","method":"POST","url":"/index.php/settings/apps/enable","message":{"Exception":"Error","Message":"Call to a member function getContainer() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":143,"function":"delegateContainerRegistrations","class":"OC\\AppFramework\\Bootstrap\\RegistrationContext","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":86,"function":"registerApps","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Installer.php","line":146,"function":"runLazyRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/RegistrationContext.php","Line":405,"CustomMessage":"Error during service alias registration of workflowengine: Call to a member function getContainer() on null"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.0.18"}
{"reqId":"iPqRMxgChg66VQniutC1","level":3,"time":"2021-03-29T03:48:06+00:00","remoteAddr":"192.168.10.92","user":"Hakim","app":"no app in context","method":"GET","url":"/index.php/apps/files","message":{"Exception":"Error","Message":"Interface 'OCA\\Files_External\\Lib\\Config\\IBackendProvider' not found","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/composer/composer/ClassLoader.php","line":476,"function":"include"},{"file":"/var/www/nextcloud/lib/composer/composer/ClassLoader.php","line":344,"function":"Composer\\Autoload\\includeFile"},{"function":"loadClass","class":"Composer\\Autoload\\ClassLoader","type":"->"},{"file":"/var/www/nextcloud/apps/sharepoint/lib/AppInfo/Application.php","line":38,"function":"spl_autoload_call"},{"file":"/var/www/nextcloud/apps/sharepoint/appinfo/app.php","line":6,"function":"registerBackendProvider","class":"OCA\\SharePoint\\AppInfo\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":295,"args":["/var/www/nextcloud/apps/sharepoint/appinfo/app.php"],"function":"require_once"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":177,"function":"requireAppFile","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":137,"function":"loadApp","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":979,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/sharepoint/lib/Backend/Provider.php","Line":31,"CustomMessage":"App sharepoint threw an error during app.php load and will be disabled: Interface 'OCA\\Files_External\\Lib\\Config\\IBackendProvider' not found"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.0.18"}

Thanks,
Hakim

@Hakim if you haven’t logs maybe php is broken. Can you send the line of memory limit ( to be sure it is correctly set).

@Mageunic, below are the screenshot for the memory limit
after i change the memory limit i did restart my apache2 service

image

@Hakim I think the value you have set isn’t good for php try this :

memory_limit = 1024M

Thanks @Mageunic, that resolved the issue, currently i am looking for a way for the redis.

1 Like

@Hakim have you some error with Redis? if not, install redis-server php-redis ( sudo apt-get install redis-server php-redis) and add these lines to your config.php for enable it :

‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
),

1 Like

Thanks @mageunic for the solution to my issue!!

1 Like