gpt4 book ai didi

web-applications - 一个主机名上不同端口上的两个应用程序的 SSL 代理

转载 作者:太空宇宙 更新时间:2023-11-03 15:04:48 25 4
gpt4 key购买 nike

我们将 Nginx 用作 SSL 代理,并且有一个主机名和两个不同端口上的两个应用程序。如果可能,在 nginx.conf 中进行设置的最佳方法是什么。

最佳答案

为您的应用设置命名位置,并在 try_files 指令中引用这些位置:

server {
location @app1 {
... (proxy/fcgi/sgci directives depending on what kind of app you're directing to)
}

location @app2 {
... (proxy/fcgi/sgci directives depending on what kind of app you're directing to)
}

location /app-path1/ {try_files @app1;}
location /app-path2/ {try_files @app2;}
}

关于web-applications - 一个主机名上不同端口上的两个应用程序的 SSL 代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11906906/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com