ubuntu 14.04 使用 Nginx 代理 netcore

1.安装 Nginx

  sudo apt-get install nginx

2.打开配置文件

  sudo vi /etc/nginx/sites-available/default

3.server 节点更换为

  server {

    listen 80;

    listen [::]:80; 

   server_name subdomain.domain.com;

    location / {

        proxy_pass http://localhost:8001;#core你自己配置的端口

    }

}

4.更新配置

  sudo nginx -c /etc/nginx/nginx.conf

5.启动 程序

  sudo dotnet run

6.成功截图

  

原文地址:https://www.cnblogs.com/ayzhanglei/p/5635549.html