微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

nginx 不重定向本地但可以从其他网络重定向

如何解决nginx 不重定向本地但可以从其他网络重定向

我在使用 Nginx 时遇到了麻烦。问题是,当我通过手机或笔记本电脑通过数据连接或在朋友的 wifi 上访问 mywebpage.org 时,它可以工作。但是,如果我尝试通过 wifi 或同一家庭网络上的电缆连接访问它,它会加载几分钟(几分钟后,控制台中会出现一些错误)。

它应该将我重定向到我的家 IP 192.168.1.100:2000,那里有我的 nextcloud。一段时间后,nextcloud 的标志出现,但没有进展。如果我按 F12 并查看 Sources,我可以看到浏览器获得了诸如 favicon css 之类的内容。但该网站只能加载几分钟。

我的系统描述

我安装了 Debian 服务器,我在其中打开了媒体库、Nextcloud 和 Home Assistant。 Nginx 是随 OMV 自动安装的。我尝试使用通过 portainer 安装的 Nginx 代理管理器,但他做了同样的事情。我在此设置中未使用 HTTPS。

几分钟后,浏览器控制台中出现此错误

GET http://taligo.hopto.org/core/js/dist/files_client.js?v=108eacf6-0 net::ERR_CONNECTION_RESET 200 (OK)
login:33 GET http://taligo.hopto.org/core/js/dist/login.js?v=108eacf6-0 net::ERR_CONNECTION_RESET 200 (OK)
login:18 GET http://taligo.hopto.org/core/js/dist/main.js?v=108eacf6-0 net::ERR_CONNECTION_RESET 200 (OK)
files_fileinfo.js?v=108eacf6-0:1 Uncaught ReferenceError: OC is not defined
    at Object.<anonymous> (files_fileinfo.js?v=108eacf6-0:1)
    at Object.702 (files_fileinfo.js?v=108eacf6-0:1)
    at r (files_fileinfo.js?v=108eacf6-0:1)
    at files_fileinfo.js?v=108eacf6-0:1
    at files_fileinfo.js?v=108eacf6-0:1
(anonymous) @ files_fileinfo.js?v=108eacf6-0:1
702 @ files_fileinfo.js?v=108eacf6-0:1
r @ files_fileinfo.js?v=108eacf6-0:1
(anonymous) @ files_fileinfo.js?v=108eacf6-0:1
(anonymous) @ files_fileinfo.js?v=108eacf6-0:1
merged-template-prepend.js?v=108eacf6-0:26 Uncaught ReferenceError: OC is not defined
    at merged-template-prepend.js?v=108eacf6-0:26
(anonymous) @ merged-template-prepend.js?v=108eacf6-0:26
sk.js?v=108eacf6-0:1 Uncaught ReferenceError: OC is not defined
    at sk.js?v=108eacf6-0:1
(anonymous) @ sk.js?v=108eacf6-0:1
sk_SK.js?v=108eacf6-0:1 Uncaught ReferenceError: OC is not defined
    at sk_SK.js?v=108eacf6-0:1
(anonymous) @ sk_SK.js?v=108eacf6-0:1
index.js:24 Uncaught ReferenceError: OC is not defined
    at Object.344 (index.js:24)
    at r (bootstrap:19)
    at bootstrap:83
    at main.js?v=108eacf6-0:1
344 @ index.js:24
r @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ main.js?v=108eacf6-0:1
viewer.js:22 Uncaught ReferenceError: OC is not defined
    at Module.<anonymous> (viewer.js:22)
    at o (bootstrap:63)
    at bootstrap:195
    at bootstrap:195
(anonymous) @ viewer.js:22
o @ bootstrap:63
(anonymous) @ bootstrap:195
(anonymous) @ bootstrap:195
sk.js?v=108eacf6-0:1 Uncaught ReferenceError: OC is not defined
    at sk.js?v=108eacf6-0:1
(anonymous) @ sk.js?v=108eacf6-0:1
script.js?v=108eacf6-0:492 Uncaught ReferenceError: jQuery is not defined
    at script.js?v=108eacf6-0:492
(anonymous) @ script.js?v=108eacf6-0:492
files.js?v=108eacf6-0:122 Uncaught ReferenceError: jQuery is not defined
    at files.js?v=108eacf6-0:122
(anonymous) @ files.js?v=108eacf6-0:122
sk.js?v=108eacf6-0:1 Uncaught ReferenceError: OC is not defined
    at sk.js?v=108eacf6-0:1
(anonymous) @ sk.js?v=108eacf6-0:1
theming.js?v=108eacf6-0:1 Uncaught ReferenceError: OCA is not defined
    at theming.js?v=108eacf6-0:1
(anonymous) @ theming.js?v=108eacf6-0:1
backgroundjobs.js?v=108eacf6-0:24 Uncaught ReferenceError: $ is not defined
    at backgroundjobs.js?v=108eacf6-0:24
(anonymous) @ backgroundjobs.js?v=108eacf6-0:24
files_pdfviewer-public.js?v=108eacf6-0:44 Files_PDFViewer initialized for public page {isPublicPage: null,canDownload: true,isSecureViewerAvailable: false}
DevTools Failed to load source map: Could not load content for http://taligo.hopto.org/core/js/dist/files_fileinfo.js.map: Load canceled due to load timeout
DevTools Failed to load source map: Could not load content for http://taligo.hopto.org/apps/files_pdfviewer/js/files_pdfviewer-public.js.map?v=15d058082286d206e4c8: Load canceled due to load timeout

Screenshot after connecting on home network

我是 Linux 的初学者,任何帮助对我都很重要 谢谢大家。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。