源码下载
点击下载
已去除引流信息[滑稽][玫瑰]
原文看图
启动命令
--spring.datasource.username=root --spring.datasource.password=密码
网站配置文件
记得替换域名
server {
listen 443 ssl;
server_name 192.168.6.132; #域名
ssl_certificate /www/server/panel/vhost/cert/192.168.6.132/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/192.168.6.132/privkey.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;

# 禁止访问隐藏目录(.git/)和隐藏文件(.file)和遍历目录(../)
location ~ /\. {
    deny all;
    access_log off;
    log_not_found off;
}

location / {
    root       /home/poetize/poetize-ui/; #前端路径,注意域名
    index      index.html;
    try_files  $uri $uri/ /index.html;
}

location /im {
    alias      /home/poetize/poetize-im-ui/; #这里聊天室路径,注意域名
    index      index.html;
    try_files  $uri $uri/ /index.html;
}

location /api/ {
    rewrite           ^/api/(.*)$ /$1 break;
    proxy_pass        http://127.0.0.1:8081;
    proxy_redirect    off;
    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 /socket {
    proxy_pass          http://127.0.0.1:9324;
    proxy_http_version  1.1;
    proxy_set_header    Upgrade $http_upgrade;
    proxy_set_header    Connection "upgrade";
    proxy_read_timeout  600s;
}


location /static/ {
    alias /home/poetize/file/; 
    autoindex off;
    valid_referers 192.168.6.132;
    if ($invalid_referer) {
        #return 403;
    }
}

}
(附带源码)最美博客poetize搭建教程 第5张插图
(附带源码)最美博客poetize搭建教程 第6张插图