【问题标题】:Nginx Proxy On Custom Port自定义端口上的 Nginx 代理
【发布时间】:2020-09-27 06:04:19
【问题描述】:

我有一个节点进程正在侦听端口 11180,并希望将所有来自 https:example.com:11179 的请求重定向到它。我怎样才能用 nginx 做到这一点?

我不能使用端口 443,因为它正在转发到不同的进程。但是我确实有域 example.com 的证书

我试过使用这个配置

server {
  listen 11179 ssl
  location / {
     proxy_pass http://127.0.0.1:11180
      ...
  }
}

但是网站只是一直在加载,但是如果我在端口 443 上监听,相同的配置会起作用

server {
  listen 443 ssl
  location / {
     proxy_pass http://127.0.0.1:11180
      ...
  }
}

非常感谢您的帮助

【问题讨论】:

  • 你能列出一个完整的 Nginx 配置吗?

标签: node.js express nginx proxy port


【解决方案1】:

原来是防火墙问题:P

【讨论】:

    猜你喜欢
    • 2018-04-08
    • 2015-07-22
    • 2014-09-26
    • 2023-03-31
    • 2020-12-10
    • 2020-08-12
    • 1970-01-01
    • 1970-01-01
    • 2015-07-13
    相关资源
    最近更新 更多