<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      .NET 反向代理-YARP 部署Https(SSL)

        YARP 作為反向代理中間件,那就無可避免需要使用到 Https 去部署項目,那 YARP 要怎么去實現呢,本來以為 YARP 會有一套自己的實現,在翻閱了資料后發現,根本不是我想的那樣,按照 YARP 官方文檔的說法,是按照 .Net Core 原本的那一套去實現,好家伙,真的沒想到啊,下面我貼出官方原文,大伙看一看,瞧一瞧

        IIS就不多說了,這個畢竟只能在 windows 上使用,下面我說說 在 Kestrel 怎么設置 Https 吧,按照我的慣例,直接貼配置文件

      "Kestrel": {
        "Endpoints": {
          "MySniEndpoint": {
            "Url": "https://*:5209",
            "SslProtocols": [ "Tls11", "Tls12" ],
            "Sni": {
              "test1.ysmc.net.cn": {
                "Certificate": {
                  "Path": "[path]\\test1.ysmc.net.cn_server.pfx",
                  "Password": "pfx密碼"
                }
              },
              "test2.ysmc.net.cn": {
                "Certificate": {
                  "Path": "[path]\\test2.ysmc.net.cn_server.pfx",
                  "Password": "pfx密碼"
                }
              }
            }
          }
        },
        //,默認配置,當沒有配置的時候,默認回落到這個配置   
        "Certificates": {
          "Default": {
            "Path": "[path]\\test1.ysmc.net.cn_server.pfx",
            "Password": "pfx密碼"
          }
        }

        因為我們需要配置多個域名,所以使用到了 Sni,下面是官方對一 Sni 的部分介紹,感興趣的小伙伴可以過去看看,傳送門


       

      SNI in configuration

      Kestrel supports SNI defined in configuration. An endpoint can be configured with an object that contains a mapping between host names and HTTPS options. The connection host name is matched to the options and they are used for that connection.Sni

      The following configuration adds an endpoint named that uses SNI to select HTTPS options based on the host name:MySniEndpoint

      HTTPS options that can be overridden by SNI:

      The host name supports wildcard matching:

      • Exact match. For example, matches .a.example.orga.example.org
      • Wildcard prefix. If there are multiple wildcard matches then the longest pattern is chosen. For example, matches and .*.example.orgb.example.orgc.example.org
      • Full wildcard. matches everything else, including clients that aren't using SNI and don't send a host name.*

      The matched SNI configuration is applied to the endpoint for the connection, overriding values on the endpoint. If a connection doesn't match a configured SNI host name then the connection is refused.


       

      下面一起看看配置后的效果吧,非常的完美

       

         整個完整的配置文件我也貼出來吧,至于證書怎么申請的,大家有域名的可以到域名服務商里申請免費1年期的,沒有域名的話,可以自己改一下hosts 文件 然后自己自簽名一個,都是可以的

      appsettings.json

      {
        "Logging": {
          "LogLevel": {
            "Default": "Information",
            "Microsoft.AspNetCore": "Warning"
          }
        },
        "Kestrel": {
          "Endpoints": {
            "MySniEndpoint": {
              "Url": "https://*:5209",
              "SslProtocols": [ "Tls11", "Tls12" ],
              "Sni": {
                "test1.ysmc.net.cn": {
                  "Certificate": {
                    "Path": "[path]\\test1.ysmc.net.cn_server.pfx",
                    "Password": "pfx密碼"
                  }
                },
                "test2.ysmc.net.cn": {
                  "Certificate": {
                    "Path": "[path]\\test2.ysmc.net.cn_server.pfx",
                    "Password": "pfx密碼"
                  }
                }
              }
            }
          },
          "Certificates": {
            "Default": {
              "Path": "[path]\\test1.ysmc.net.cn_server.pfx",
              "Password": "pfx密碼"
            }
          }
        },
        "ReverseProxy": {
          "Routes": {
            "baidu": {
              "ClusterId": "baidu",
              "Match": {
                "Hosts": [ "test1.ysmc.net.cn" ],
                "Path": "{**catch-all}"
              }
            },
            "blazor": {
              "ClusterId": "blazor",
              "Match": {
                "Hosts": [ "test2.ysmc.net.cn" ],
                "Path": "{**catch-all}"
              }
            }
          },
          "Clusters": {
            "baidu": {
              "LoadBalancingPolicy": "RoundRobin",
              "Destinations": {
                "baidu": {
                  "Address": "https://www.baidu.com/"
                }
              }
            },
            "blazor": {
              "LoadBalancingPolicy": "RoundRobin",
              "Destinations": {
                "blazor": {
                  "Address": "https://www.blazor.zone/"
                }
              }
            }
          }
        }
      }

       原文鏈接:http://www.rzrgm.cn/ysmc/p/16717580.html

      posted @ 2022-09-21 23:10  一事冇誠  閱讀(3772)  評論(1)    收藏  舉報
      主站蜘蛛池模板: 一区二区三区在线 | 欧洲| 亚洲另类无码一区二区三区| 亚洲日韩久热中文字幕| 亚洲AV无码破坏版在线观看| 日韩激情成人| 日日爽日日操| 国产明星精品无码AV换脸| 亚洲中文字幕无码永久在线| 日韩亚洲国产激情一区二区| 人妻少妇无码精品专区| 国产午夜伦鲁鲁| 国产系列高清精品第一页| 亚洲高清WWW色好看美女| 绥化市| 亚洲国产精品无码久久电影| 国产精品一区二区久久精品无码| 亚洲人妻一区二区精品| 起碰免费公开97在线视频 | 午夜AAAAA级岛国福利在线| 亚洲 日韩 在线精品| 精品亚洲精品日韩精品| 激情综合网激情综合网五月| 色噜噜狠狠成人综合| 在国产线视频A在线视频| 久久综合五月丁香六月丁香| 美女一区二区三区亚洲麻豆| 久久久久综合一本久道| 久热这里只国产精品视频| 亚洲精品国产av一区二区| 婷婷丁香五月亚洲中文字幕| 免费超爽大片黄| 国产一区二区三区导航| 一级做a爰片在线播放| 国产亚洲欧洲av综合一区二区三区| 亚洲精品综合网二三区| 美女扒开奶罩露出奶头视频网站| 久久一区二区三区黄色片| 在线免费成人亚洲av| 日韩有码精品中文字幕| 人妻体内射精一区二区三四| 91福利国产成人精品导航|