1、安裝Nginxnginx
yum install nginxbash
2、配置Nginxide
vi /etc/nginx/nginx.conf工具
location / { proxy_pass http://127.0.0.1:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache_bypass $http_upgrade; }
3、設置Nginx開機啓動rest
systemctl enable nginx.serviceserver
4、安裝守護進程工具blog
yum install supervisor進程
5、配置守護進程信息rem
cd /etc/supervisord.dit
vi videoserver.ini
[program:VideoServer.Site] command=dotnet VideoCheckServer.dll directory=/usr/bin/videoserver environment=ASPNETCORE__ENVIRONMENT=Production user=root stopsignal=INT autostart=true autorestart=true startsecs=3 stderr_logfile=/var/log/videoserver.err.log stdout_logfile=/var/log/videoserver.out.log
supervisord -c /etc/supervisord.conf
6、設置開機啓動守護工具
systemctl enable supervisord.service