【问题标题】:How does Nginx support http and https back-end apps?Nginx 如何支持 http 和 https 后端应用程序?
【发布时间】:2012-06-14 03:16:05
【问题描述】:

有人对这种架构有经验吗?
注意:1.11 上的 GalssFish2.x 本身支持 SSL。

【问题讨论】:

  • 这张图在实际上下文中没有多大意义......你想达到什么目的?

标签: https nginx glassfish


【解决方案1】:

您可以根据location 块简单地定义多个单独的上游服务器并代理它们。

http {
    upstream backend1 {
        server 1.2.3.4:80;
    }
    upstream backend2 {
        server 5.6.7.8:80;
    }

    server {
        [...]
        location / {
            proxy_pass http://backend1;
        }

        location /flow {
            proxy_pass https://backend2;
        }
    }
}

当然,这个例子被简化了很多。 查看the wikithe documentation

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-02-28
    • 2011-01-10
    • 2023-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-15
    • 2015-09-15
    相关资源
    最近更新 更多