Centos+Nginx+NetCore3.1部署
1 先將vs2019升級到,16.4.0版本

2.新建一.netcore3.1的web程式

3.編譯后將專案上傳到centos服務器

4.配置nginx檔案

修改完后重新加載ngxin. service nginx restart
5.安裝守護行程確保程式例外中斷后能正常重啟
在 etc/systemd/system下新建 netcore.service,內容如下

保存檔案后執行
systemctl enable netcore.service
systemctl start netcore.service
查看狀態:systemctl status netcore.service
此時如果kill掉netcore行程,過幾秒后可以看到應用又自動重啟了
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/84812.html
標籤:.NET Core
