怎麼在linux 用nginx作代理 配置.net core

1. 安裝 .net core到centos7nginx

2. 安裝nginx        vim

  配置代理: vim /opt/nginx/conf/nginx.confcentos

  

 server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

         location / {
                proxy_pass http://127.0.0.1:5000;
                proxy_set_header Connection "";
                proxy_http_version 1.1;
        }
}

  

 

  啓動nginx: /opt/nginx/sbin/nginx併發

  中止nginx: /opt/nginx/sbin/nginx -s stopcentos7

  重啓nginx:/opt/nginx/sbin/nginx -s reload.net

3. 用VS2015新建 .net core WEB項目。併發布。代理

4. COPY發佈的文件到centos7server

5. dotnet TEST.WEB.dllblog

6. 打開鏈接 localhsot:5000io

相關文章
相關標籤/搜索