Hello,
I changed the URL of my installation as described in article Change URL Nextcloud. Changed the SSL settings and extracted the old domain from all config files (
/etc/apache2/available-sites/*.conf
/var/www/nextcloud/config/config.php).
Result: Browser-Window is empty and in error-log appears:
flock() expects parameter 1 to be resource, bool given in /var/www/nextcloud/lib/private/Config.php
System-Infos:
Nextcloud version: 20.0.9
Operating system and version: Ubuntu 20.04
Server version: Apache/2.4.41 (Ubuntu)
Server built: 2020-08-12T19:46:17
PHP Version: 7.4.3 (cli) (built: May 26 2020 12:24:22) ( NTS )
Zend Engine v3.4.0, Copyright © Zend Technologies
---------------------------------------------------+
/var/www/nextcloud/config.php
---------------------------------------------------+
$CONFIG = array (
‘instanceid’ => ‘xxxxxxxxxxxxx’,
‘passwordsalt’ => ‘xxxxxxxxxxxxx’,
‘secret’ => ‘xxxxxxxxxxxxx’,
‘trusted_domains’ =>
array (
0 => ‘cloud.hskup-online.de’,
),
‘datadirectory’ => ‘/var/www/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘20.0.0.9’,
‘overwrite.cli.url’ => ‘http://cloud.hskup-online.de’,
‘dbname’ => ‘xxxxxxxxxxxxx’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘xxxxxxxxxxxxx’,
‘dbpassword’ => ‘xxxxxxxxxxxxx’,
‘installed’ => true,
‘mail_from_address’ => ‘admin’,
‘mail_smtpmode’ => ‘smtp’,
‘mail_sendmailmode’ => ‘smtp’,
‘mail_domain’ => ‘xxxxxxxxxxxxx.de’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_smtpauth’ => 1,
‘mail_smtphost’ => ‘smtp.xxxxxxxxxxxxx.de’,
‘mail_smtpname’ => ‘admin@xxxxxxxxxxxxx.de’,
‘mail_smtppassword’ => xxxxxxxxxxxxx’,
‘mail_smtpport’ => ‘465’,
‘mail_smtpsecure’ => ‘ssl’,
‘maintenance’ => false,
‘has_rebuilt_cache’ => true,
);
---------------------------------------------------------------------------------+
enabled: /etc/apache2/sites-availaible/nextcloud-hskup-ssl.conf
---------------------------------------------------------------------------------+
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot “/var/www/nextcloud”
ServerName cloud.hskup-online.de
ErrorLog ${APACHE_LOG_DIR}/nextcloud.hskup.error
CustomLog ${APACHE_LOG_DIR}/nextcloud.hskup.access combined
<Directory /var/www/nextcloud/>
Require all granted
Options FollowSymlinks MultiViews
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
Satisfy Any
</Directory>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
SSLCertificateFile /etc/letsencrypt/live/XXXXXXX.de/xxxxx.pem
SSLCertificateKeyFile /etc/letsencrypt/live/XXXXXXX.de/xxxxx.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
-------------------------------------------------------------------------------------------------------+
Extract from ErrorLog ${APACHE_LOG_DIR}/nextcloud.hskup.error
-------------------------------------------------------------------------------------------------------+
[Mon Oct 19 21:43:52.495109 2020]
[proxy_fcgi:error]
[pid 108647]
[client 88.152.185.12:49649] AH01071: Got error ‘PHP message: PHP Warning: flock() expects parameter 1 to be resource, bool given in /var/www/nextcloud/lib/private/Config.php on line 211
PHP message: PHP Fatal error: Uncaught Error: Call to a member function getLogger() on null in /var/www/nextcloud/index.php:60
Stack trace:\n#0 {main}
thrown in /var/www/nextcloud/index.php on line 60’
-------------------------------------------------------------------------------------------------------+
Extract from /var/www/nextcloud/lib/private/Config.php
-------------------------------------------------------------------------------------------------------+
001: /**
002: * @copyright Copyright © 2016, ownCloud, Inc.
003: *
xxx: …
037: */
038:
039: namespace OC;
…
210: // Try to acquire a file lock
211: if (!flock($filePointer, LOCK_SH)) {
212: throw new \Exception(sprintf(‘Could not acquire a shared lock on the config file %s’, $file));
213: }
…
267: if (function_exists(‘opcache_invalidate’)) {
268: @opcache_invalidate($this->configFilePath, true);
269: }
270: }
271: }
Thanks
The old url scu-cloud.de worked perfect.
cu MiDa
Sorry - how can i format code and logs correct?