Impossible to start my nextcloud

Hello,
Sorry for langage mistakes. I’m not fluent.
I have just intalled nextcloud on a VPS.
After installation, I try to access my cloud and this is written :

Translation using DeepL :

The server is unable to execute your request.
If this happens again, please send the technical details below to the server administrator.
The server log file may provide more information.

So I went to the log file (/var/log/apache2/error.log). This lines has been added :

[Tue Mar 17 14:36:28.786804 2020] [mpm_prefork:notice] [pid 16942] AH00171: Graceful restart requested, doing restart
[Tue Mar 17 14:36:29.009260 2020] [mpm_prefork:notice] [pid 16942] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured – resuming normal operations
[Tue Mar 17 14:36:29.009278 2020] [core:notice] [pid 16942] AH00094: Command line:
‘/usr/sbin/apache2’

I use some virtual hosts to have my cloud on cloud.website.fr and an other site web on www.website.fr

Do you have an idea about the problem?

Thank you

No real idea. Perhaps it is a problem with SSL. Can you tell us your url to start nextcloud (http vs. https?) Post access.log and other logs.

Ok it works!

I tried

chmod -R 665 /etc/ssl
But it didn’t succeed

So I went to the nextcloud.log :

[Tue Mar 17 17:41:16.992930 2020] [php7:warn] [pid 21272] [client 77.140.103.238:52250] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 83
[Tue Mar 17 17:41:16.992990 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:16+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/index.php",“message”:“touch(): Unable to create file /var/www/nextcloud/config/config.php because Permission denied at /var/www/nextcloud/lib/private/Config.php#241”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
[Tue Mar 17 17:41:16.993146 2020] [php7:warn] [pid 21272] [client 77.140.103.238:52250] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 83
[Tue Mar 17 17:41:16.993176 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:16+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/index.php",“message”:“fopen(/var/www/nextcloud/config/config.php): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Config.php#242”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
[Tue Mar 17 17:41:16.993303 2020] [php7:warn] [pid 21272] [client 77.140.103.238:52250] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 83
[Tue Mar 17 17:41:16.993324 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:16+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/index.php",“message”:“chmod(): No such file or directory at /var/www/nextcloud/lib/private/Config.php#245”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
[Tue Mar 17 17:41:16.995805 2020] [php7:warn] [pid 21272] [client 77.140.103.238:52250] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 83
[Tue Mar 17 17:41:16.995853 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:16+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/index.php",“message”:“fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log at /var/www/nextcloud/lib/private/Log/File.php#83”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
[Tue Mar 17 17:41:16.995876 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:16+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"/index.php",“message”:{“Exception”:“OC\\HintException”,“Message”:“Can’t write into config directory!”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/lib/private/Config.php",“line”:133,“function”:“writeData”,“class”:“OC\\Config”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/SystemConfig.php",“line”:112,“function”:“setValue”,“class”:“OC\\Config”,“type”:"->",“args”:[“instanceid”,“octcd3mtmpul”]},{“file”:"/var/www/nextcloud/lib/private/legacy/util.php",“line”:1153,“function”:“setValue”,“class”:“OC\\SystemConfig”,“type”:"->",“args”:[“instanceid”,“octcd3mtmpul”]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:420,“function”:“getInstanceId”,“class”:“OC_Util”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:647,“function”:“initSession”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:1089,“function”:“init”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/index.php",“line”:36,“args”:["/var/www/nextcloud/lib/base.php"],“function”:“require_once”}],“File”:"/var/www/nextcloud/lib/private/Config.php",“Line”:252,“Hint”:“This can usually be fixed by giving the webserver write access to the config directory. See https://docs.nextcloud.com/server/18/go.php?to=admin-dir_permissions",“CustomMessage”:"--"},“userAgent”:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
[Tue Mar 17 17:41:16.996407 2020] [php7:warn] [pid 21272] [client 77.140.103.238:52250] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 83
[Tue Mar 17 17:41:16.996432 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:16+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/index.php",“message”:“fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log at /var/www/nextcloud/lib/private/Log/File.php#83”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
[Tue Mar 17 17:41:16.996451 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:16+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"/index.php",“message”:{“Exception”:“Doctrine\\DBAL\\DBALException”,“Message”:“Failed to connect to the database: An exception occurred in driver: could not find driver”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",“line”:1040,“function”:“connect”,“class”:“OC\\DB\\Connection”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/DB/Connection.php",“line”:220,“function”:“executeUpdate”,“class”:“Doctrine\\DBAL\\Connection”,“type”:"->",“args”:[“PRAGMA read_uncommitted = 1”,[],[]]},{“file”:"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",“line”:683,“function”:“executeUpdate”,“class”:“OC\\DB\\Connection”,“type”:"->",“args”:[“PRAGMA read_uncommitted = 1”]},{“file”:"/var/www/nextcloud/lib/private/DB/Connection.php",“line”:155,“function”:“setTransactionIsolation”,“class”:“Doctrine\\DBAL\\Connection”,“type”:"->",“args”:[2]},{“file”:"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php",“line”:195,“function”:“construct",“class”:“OC\\DB\\Connection”,“type”:"->",“args”:[{“adapter”:“OC\\DB\\AdapterSqlite”,“driver”:“pdo_sqlite”,“wrapperClass”:“OC\\DB\\Connection”,“user”:"",“password”:"",“path”:"/var/www/nextcloud/data/owncloud.db",“tablePrefix”:"oc",“sqlite.journal_mode”:“WAL”,“defaultTableOptions”:{“collate”:“utf8_bin”,“tablePrefix”:"oc”},“platform”:{“class”:“OC\\DB\\OCSqlitePlatform”}},{“class”:“Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver”},{“class”:“Doctrine\\DBAL\\Configuration”},{“class”:“Doctrine\\Common\\EventManager”}]},{“file”:"/var/www/nextcloud/lib/private/DB/ConnectionFactory.php",“line”:157,“function”:“getConnection”,“class”:“Doctrine\\DBAL\\DriverManager”,“type”:"::",“args”:[{“adapter”:“OC\\DB\\AdapterSqlite”,“driver”:“pdo_sqlite”,“wrapperClass”:“OC\\DB\\Connection”,“user”:"",“password”:"",“path”:"/var/www/nextcloud/data/owncloud.db",“tablePrefix”:“oc_”,“sqlite.journal_mode”:“WAL”,“defaultTableOptions”:{“collate”:“utf8_bin”,“tablePrefix”:“oc_”},“platform”:{“class”:“OC\\DB\\OCSqlitePlatform”}},{“class”:“Doctrine\\DBAL\\Configuration”},{“class”:“Doctrine\\Common\\EventManager”}]},{“file”:"/var/www/nextcloud/lib/private/Server.php",“line”:748,“function”:“getConnection”,“class”:“OC\\DB\\ConnectionFactory”,“type”:"->",“args”:[“sqlite”,{“user”:"",“password”:"",“path”:"/var/www/nextcloud/data/owncloud.db",“tablePrefix”:“oc_”,“sqlite.journal_mode”:“WAL”,“defaultTableOptions”:{“collate”:“utf8_bin”,“tablePrefix”:“oc_”},“platform”:{“class”:“OC\\DB\\OCSqlitePlatform”}}]},{“file”:"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:118,“function”:“OC\\{closure}”,“class”:“OC\\Server”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“OCP\\IDBConnection”]},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“line”:162,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“OCP\\IDBConnection”]},{“file”:"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:114,“function”:“OC\\AppFramework\\Utility\\{closure}”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“DatabaseConnection”]},{“file”:"/var/www/nextcloud/lib/private/Server.php",“line”:1664,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“DatabaseConnection”]},{“file”:"/var/www/nextcloud/lib/private/Server.php",“line”:571,“function”:“getDatabaseConnection”,“class”:“OC\\Server”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:118,“function”:“OC\\{closure}”,“class”:“OC\\Server”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“OC\\AppConfig”]},{“file”:"/var/www/nextcloud/lib/private/Server.php",“line”:803,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“OC\\AppConfig”]},{“file”:"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:118,“function”:“OC\\{closure}”,“class”:“OC\\Server”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“OC\\App\\AppManager”]},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“line”:162,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“OC\\App\\AppManager”]},{“file”:"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:114,“function”:“OC\\AppFramework\\Utility\\{closure}”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[" sensitive parameters replaced ***"]},{“file”:"/var/www/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“AppManager”]},{“file”:"/var/www/nextcloud/lib/private/Server.php",“line”:1835,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“AppManager”]},{“file”:"/var/www/nextcloud/lib/private/legacy/template.php",“line”:285,“function”:“getAppManager”,“class”:“OC\\Server”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/index.php",“line”:47,“function”:“printErrorPage”,“class”:“OC_Template”,“type”:"::",“args”:[“Can’t write into config directory!”,“This can usually be fixed by giving the webserver write access to the config directory. See https://docs.nextcloud.com/server/18/go.php?to=admin-dir_permissions",503]}],“File”:"/var/www/nextcloud/lib/private/DB/Connection.php",“Line”:68,“CustomMessage”:"--"},“userAgent”:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
[Tue Mar 17 17:41:17.006371 2020] [php7:warn] [pid 21272] [client 77.140.103.238:52250] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 83
[Tue Mar 17 17:41:17.006426 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:17+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/index.php",“message”:“fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log at /var/www/nextcloud/lib/private/Log/File.php#83”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
[Tue Mar 17 17:41:17.006450 2020] [php7:notice] [pid 21272] [client 77.140.103.238:52250] {“reqId”:“u6WgQufgbqmnmRBMyAYO”,“level”:3,“time”:“2020-03-17T16:41:17+00:00”,“remoteAddr”:“77.140.103.238”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/index.php",“message”:“chmod(): No such file or directory at /var/www/nextcloud/lib/private/Log/File.php#84”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:""}
77.140.103.238 - - [17/Mar/2020:17:41:16 +0100] “GET /index.php HTTP/1.1” 500 4903 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/js/mimetypelist.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 2132 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/js/select2-toggleselect.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 1566 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/search/js/search.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 2585 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/js/mimetype.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 2298 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/l10n/fr.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 18249 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/search/js/searchprovider.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 4120 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/js/files/fileinfo.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 1254 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/js/files/client.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 6097 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/css/guest.css?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 5932 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/js/dist/main.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1” 200 411553 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/img/logo/logo.svg?v=1 HTTP/1.1” 200 631 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/img/background.png?v=2 HTTP/1.1” 200 35736 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/img/favicon-touch.png HTTP/1.1” 200 3247 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”
77.140.103.238 - - [17/Mar/2020:17:41:17 +0100] “GET /core/img/favicon.ico HTTP/1.1” 200 3606 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”

Especialy this line :

This can usually be fixed by giving the webserver write access to the config directory.

So I use this command I found in the documentation :

sudo chown -R www-data:www-data /var/www/nextcloud/

Thank you for your help, I didn’t know there was “other logs” ahah. I’m a total beginner.

Have a nice day !