ubuntu更改asp.netcore项目发布路径
ubuntu:18.04
1、新建项目发布路径
cd /var
mkdir temppublish
2、修改路径上传权限
chmod -R 777 /var/temppublish
3、FileZilla上传文件
4、修改vsftpd.conf文件
local_root=/var/temppublish
重启服务,sudo service vsftpd restart
5、新建supervisor文件
cd /etc/supervisor/conf.d
touch myproject.conf
[program:myproject] command=dotnet myproject.dll directory=/var/temppublish autostart=true autorestart=true stderr_logfile=/var/log/website.err.log stdout_logfile=/var/log/website.out.log environment=ASPNETCORE_ENVIRONMENT=Production user=root stopsignal=INT stopasgroup=true killasgroup=true
重启服务,sudo service supervisor restart
6、访问测试地址