专注于 JetBrains IDEA 全家桶,永久激活,教程
持续更新 PyCharm,IDEA,WebStorm,PhpStorm,DataGrip,RubyMine,CLion,AppCode 永久激活教程

CentOS7下让Asp.Net Core的网站自动运行

一、安装Nginx

yum install nginx

二、配置Nginx

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;
        }

  

三、设置Nginx开机启动

systemctl enable nginx.service

四、安装守护进程工具

yum install supervisor

五、配置守护进程信息

cd /etc/supervisord.d

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

六、设置开机启动守护工具

systemctl enable supervisord.service

文章永久链接:https://tech.souyunku.com/36751

未经允许不得转载:搜云库技术团队 » CentOS7下让Asp.Net Core的网站自动运行

JetBrains 全家桶,激活、破解、教程

提供 JetBrains 全家桶激活码、注册码、破解补丁下载及详细激活教程,支持 IntelliJ IDEA、PyCharm、WebStorm 等工具的永久激活。无论是破解教程,还是最新激活码,均可免费获得,帮助开发者解决常见激活问题,确保轻松破解并快速使用 JetBrains 软件。获取免费的破解补丁和激活码,快速解决激活难题,全面覆盖 2024/2025 版本!

联系我们联系我们