简体   繁体   English

Nginx如何支持http和https后端应用程序?

[英]How does Nginx support http and https back-end apps?

在此处输入图片说明

Does anybody have experience about this kind of architecture? 有人对这种架构有经验吗?
Note: GalssFish2.x on 1.11 supports SSL itself. 注意:1.11上的GalssFish2.x本身支持SSL。

You can simply define multiple separate upstream servers and proxy to them based on location block. 您可以简单地定义多个单独的上游服务器,并根据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;
        }
    }
}

This example is simplified a lot, of course. 当然,此示例已大大简化。 Check out the wiki and the documentation . 查看Wiki文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM