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:5000;#core你自己配置的端口
}
}
4.更新配置
sudo nginx -c /etc/nginx/nginx.conf
5.启动程序
sudo dotnet run
6.成功截图
