【问题标题】:nginx not redirecting localy but ok from other networksnginx 没有在本地重定向,但可以从其他网络重定向
【发布时间】:2022-04-30 03:12:54
【问题描述】:

我在使用 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

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

【问题讨论】:

  • 我试图在我的路由器中关闭我的端口转发规则的发夹。然后网站根本不会加载。网络浏览器显示此站点不可用。

标签: nginx nginx-reverse-proxy nextcloud openmediavault


【解决方案1】:

如果您将 nextcloud 添加到 /etc/hosts 可能会有所帮助

【讨论】:

  • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
  • 感谢您的回答,问题出在我的提供商调制解调器/路由器上。它有一个用于发夹的复选框,但它什么也没做。我买了另一个路由器,然后一切正常。
猜你喜欢
  • 1970-01-01
  • 2015-12-14
  • 2020-10-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-05
  • 1970-01-01
  • 2017-02-17
相关资源
最近更新 更多