文档地址:http://apk.neters.club/.doc/guide
2022-04-13 使用宝塔面板搭建该应用。
要点:
- 如果改用MySQL数据库,需要使用数据库root账户,不需要事先创建数据库,根据连接字符串的Database会自动创建数据库并填充初始数据。
- 使用Blog.Core.Publish.bat 创建出PublishFile之后将文件复制到宝塔wwwroot下新建的文件夹里面,然后使用supervisor创建守护进程,初始化代码:dotnet /www/wwwroot/****/Blog.Core.Api.dll
- 配套的Blog.Admin 使用npm run build出网站文件并上传到/www/wwwroot/任意新建一个目录下。
- 在面板中用域名创建一个静态网站,并在Config中填写:server {
 listen 80;
 listen [::]:80;
 server_name 域名;#charset koi8-r; 
 #access_log /var/log/nginx/host.access.log main;location / { 
 try_files $uri $uri/ /index.html;
 root /www/wwwroot/***Blog.Admin build文件地址;
 index index.html index.htm;
 }location /api/ { 
 include uwsgi_params;
 proxy_pass http://域名:9291;
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 }location /api2/ { 
 include uwsgi_params;
 proxy_pass http://域名:9291;
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection “upgrade”;
 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 }location /images/ { 
 include uwsgi_params;
 proxy_pass http://域名:9291;
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 }#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;
 #}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 
 #
 #location ~ \.php$ {
 # root html;
 # fastcgi_pass 127.0.0.1:9000;
 # fastcgi_index index.php;
 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
 # include fastcgi_params;
 #}# deny access to .htaccess files, if Apache’s document root 
 # concurs with nginx’s one
 #
 #location ~ /\.ht {
 # deny all;
 #}
 }

