跳转到主要内容
首页

用户帐户菜单

  • 登录

主导航

  • 首页
  • 小公司运营
  • 网站建设
  • 创业杂谈
  • 兼职赚钱
  • 小微企业信息化
  • 手册教程
    • 《大伟哥的Drupal 8建站指南》
    • 《通过JohnChow.Com在网上赚钱》
  • 关于

面包屑

  • 首页
  • Nextcloud通过不被信任的域名访问解决方法

Nextcloud通过不被信任的域名访问解决方法

By 大伟哥 | 2020-02-02,周日, 23:45

有了Zerotier这个好用的工具以后,原本不在同一个局域网里的多台电脑互相访问就很方便了,这给我们的数据备份和同步带来了很大的便利。大伟哥原来只是通过Nextcloud在局域网范围内同步重要数据的,现在可以扩展到任何可以联网的地方了。

这里会碰到一个问题,因为Zerotier给每台设备指定的IP地址和原来局域网里面的IP地址是不一样的,如果一台设备不在局域网内,只能通过ZeroTier分配的IP地址访问到Nextcloud的服务器,这时候原来默认安装的Nextcloud就会拒绝访问,提示“通过不被信任的域名访问”。

Nextcloud文档的相关内容如下:

All URLs used to access your Nextcloud server must be whitelisted in yourconfig.php file, under the trusted_domains setting. Users are allowed to log into Nextcloud only when they point their browsers to a URL that is listed in the trusted_domains setting. You may use IP addresses and domain names. A typical configuration looks like this:

'trusted_domains' =>
  array (
   0 => 'localhost',
   1 => 'server1.example.com',
   2 => '192.168.1.50',
   3 => '[fe80::1:50]',
),

这就很简单了,找到配置文件/config/config.php,在trusted_domains再插入一条Zerotier分配的IP地址,问题就解决了。

小微企业信息化
  • 添加新评论
  • 8608 阅读
Nextcloud

评论

访客

2 years 5 months 之前

永久连接

谢谢,有用。

  • 回复

添加新评论

此字段内容将保密,不会被其他人看见。
关于文本格式
  • 不允许使用HTML标签。
CAPTCHA
3 + 8 =
计算出这道简单的算术题并键入答案。例如、1+3,就输入 4。
发布评论前,请通过下面的验证,以免被当作垃圾评论机器人屏蔽。

搜索

沪ICP备17000093号-1

公安备案沪公网安备 31011402008254号

© 2016-2022 大伟哥博客版权所有