zoukankan      html  css  js  c++  java
  • 配置 Nginx 转发 Kestrel

    nginx.conf配置示例如下

    Tips: 使用Kestrel时, Program.cs、appsettings.json、launchSettings.json中设置的端口号保持一致。


    ###############################管理主页##################################
    server {
    listen 80;
    server_name www.www.com; #域名
    location / {
    proxy_pass http://localhost:8888; #Start Kestrel Process Address(内部的kestrel的地址)
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection keep-alive;
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    }
    #若网站存在证书。需要添加以下配置
    ssl_certificate cert/214292799730473.pem;// 改成你的证书的名字
    ssl_certificate_key cert/214292799730473.key;// 你的证书的名字
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    };


    ###############################公司主页##################################
    server {
    listen 80;
    server_name test.www.com; #域名
    location / {
        proxy_pass http://localhost:12345; #Start Kestrel Process Address(内部的kestrel的地址)
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection keep-alive;
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }}
  • 相关阅读:
    C# 访问AD查询用户信息
    js UTC时间转本地时间
    Silverlight中的序列化和反序列化
    ASP.NET FORM认证配置排错记录
    opencv中cvSetData用法
    WS2812B-64位 8*8位 RGB LED点阵
    1602 LCDKeypad Shield
    Wemos D1 使用ESP8266 板载存储
    Wemos D1 ESP8266的网络工作模式
    Wemos D1 1602 液晶屏幕
  • 原文地址:https://www.cnblogs.com/bemad/p/14852879.html
Copyright © 2011-2022 走看看