62,046
社区成员
发帖
与我相关
我的任务
分享
server{
server_name www.abc.com;
listen 80;
location / {
root /var/www/frontend;
index index.html index.htm;
}
location /api/ {
proxy_pass http://localhost:5000/api/;
}
location /api2/ {
proxy_pass http://localhost:5000/api2/;
}
}
# cat /etc/supervisor/conf.d/dotnet.conf
[program:dotnet]
command=/usr/local/dotnet/dotnet /var/www/ddns/DDNS.dll
directory=/var/www/ddns
autostart=true
autorestart=true
stderr_logfile=/var/www/daemon-ddns.err #服务报错信息的输出日志
stdout_logfile=/var/www/daemon-ddns.log #控制台输出的保存位置
log_stderr=true
log_stdout=true
user=root
3.0 用supervisorctl update 这条命令更新supervisor配置(比如有配置文件的新增、修改、删除)
3.1 supervisorctl status 查看所有supervisor托管的实例的运行状态
3.2 supervisorctl start|stop|restart xxxx 开启|停止|重启 xxxx实例。
当然,你也可以用其它方法来实现,比如注册成服务,或者借助nohup、screen命令,最终目的都是把任务维护在后台,而不需要依赖于当前会话。