CentOS7.9部署站点运行

简介

本章节主要讲的是在Linux系统CentOS7.9上去完成.NET Core 6.0软件的安装,确定Linux的版本是x64还是arm64的,然后到.NET Core的官网下载6.0的SDK,并进行安装

步骤

1.进入站点目录

2.运行站点

3.配置 Nginx 站点代理

4.浏览站点

实施

1.进入站点目录

[root@ml006 /]# cd /home/advance/website/v1/

2.运行站点

[root@ml006 v1]# dotnet Senparc.Web.dll

直到显示下图,则运行正常

 3.配置 Nginx 站点代理

[root@ml006 v1]# cd /etc/nginx/conf.d/

复制站点配置文件

[root@ml006 conf.d]# cp default.conf /etc/nginx/conf.d/test001.conf

配置站点代理

server {
    listen       80;
    server_name  你的域名;

    #access_log  /var/log/nginx/host.access.log  main;

    location / {
        proxy_pass   http://127.0.0.1:5000;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}
}

4.浏览站点

 显示这个页面,则为将站点配置成功。

posted @ 2024-07-01 00:04  MartyZane  阅读(3)  评论(0编辑  收藏  举报