惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - builderman

运行abp install-libs的时候,提示"NPM is not installed"的原因及解决办法 nginx 基本操作 nginx 正向代理与反正代理的区别及简单配置 KeyCloak基础概念 用crontab定时分隔nginx日志文件 修改linux终端中当前用户的显示颜色 minikube使用笔记 ssh端口转发 kubectl proxy 让外部网络访问K8S service的ClusterIP 记录一下我在ubuntu下安装 minikube的过程 ssh ssh-keygen 私钥 docker vscode server docker network docker mysql8 phpmyadmin linux 压缩与解压缩 Ubuntu添加开机自动启动程序的方法 Linux基本命令集合 小修改,让mvc的验证锦上添点花(2) 小修改,让mvc的验证锦上添点花(1)
linux下使用supervisor启动.net core mvc website的配置
builderman · 2018-06-09 · via 博客园 - builderman

发布好的asp.net core mvc项目,

如果想在window或linux下的以控制台程序启动的话,可以用下面的命令

dotnet MyProject.dll --urls="https://localhost:7001;http://localhost:7000" --environment=Development

默认端口为5000(https为5001)

默认环境为Production

 linux下,我们可以用supervisor来达到windows services的效果

supervisor简单使用:

/etc/supervisor/conf.d/xxx.conf

[program: xxx]
command=dotnet xxx.dll
directory=/home/wwwroot/www.xxx.com/
autorestart=true
autostart=true
stderr_logfile=/home/wwwroot/www.xxx.com/Logs/xxx.err.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stdout_logfile=/home/wwwroot/www.xxx.com/Logs/xxx.out.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
environment=ASPNETCORE_ENVIRONMENT=Production,ASPNETCORE_URLS="https://localhost:6001;http://localhost:6000"
user=root
stopsignal=INT
startsecs=3

修改配置文件后,使新配置文件生效

superversorctl help查看使用说明,有以下命令可以使用

# supervisorctl help

default commands (type help <topic>):
=====================================
add    exit      open  reload  restart   start   tail   
avail  fg        pid   remove  shutdown  status  update 
clear  maintail  quit  reread  signal    stop    version

监控日志输出情况:
supervisorctl tail -f xxx [stdout|stderr]

相关文章:
https://www.cnblogs.com/felixzh/p/6099961.html