但願給你3-5分鐘的碎片化學習,多是坐地鐵、等公交,聚沙成塔,水滴石穿,謝謝關注。linux
官方安裝地址:nginx
https://www.microsoft.com/net/learn/dotnet/hello-world-tutorial?initial-os=linuxweb
安裝完後測試一下版本api
測試一個webapi數組
dotnet new webapi
dotnet runmvc
默認是在5000端口,虛擬機該端口還沒打開,這個時候在虛擬機外面是沒法訪問的curl
再開一個終端使用curl訪問學習
返回values數組,大功告成。測試
使用vs2017發佈一個mvc項目到本地文件夾url
使用fileZilla來拷貝到/home/netcore目錄
啓動站點:dotnet run hellworld.dll
接下來就是映射5000端口到80端口,咱們進入nginx配置目錄
vi nginx.conf
include會把全部*.conf的文件都引入進來,全部咱們單獨建一個netcore.conf
進入netcore.conf
在netcore.conf內部創建端口映射,配置以下
重啓一下nginx
systemctl restart nginx
OK,部署成功!
我是IT人張飛洪,入行10年有餘,人不堪其憂,吾不改其樂,謝謝您關注。