错误Error
在其他机器上访问服务器的nextcloud时,提示如下信息:
通过不被信任的域名访问,请联系您的管理员。如果您就是管理员,请参照 config.sample.php 中的示例编辑 config/config.php 中的 “trusted_domains” 设置。
解决办法:
# vim /var/www/html/config/config.php <?php $CONFIG = array ( 'htaccess.RewriteBase' => '/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/html/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/www/html/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), 'instanceid' => 'oc4wubc7qjyh', 'passwordsalt' => 'RaTowuwdfG+/tcfdss/xxG7Wou8fdsdfsfd', 'secret' => 'iNlrd92+A6mtpR2aDjZWp8/bOHhjoOyI+wsdfsdfW2+wDXdVH8', 'trusted_domains' => array ( 0 => '192.168.xx.xx', ## IP地址 修改这里 1 => 'serverl.example.com', ## 域名 2 => '192.168.xx.xx', ## IP地址 3 => '[fe80::xx:xx]', ), 'datadirectory' => '/var/www/html/data', 'dbtype' => 'mysql', 'version' => '20.0.1.1', 'overwrite.cli.url' => 'http://www.xxx.com', 'dbname' => 'nextcloud', 'dbhost' => '192.168.xx.xx:13306', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_admin', 'dbpassword' => 'AEiu0RlUxxxeff9mF9vV0wTvdqSoj83', 'installed' => true, );