refactor: switch to free-trial/private-deploy/buyout pricing, fix feature gaps, add SEO landing + deploy config
This commit is contained in:
+40
-25
@@ -1,7 +1,15 @@
|
||||
# 宝塔面板 Nginx 配置
|
||||
# 宝塔面板 Nginx 配置 / 通用 Nginx 配置
|
||||
# 注意:请勿直接覆盖宝塔生成的配置文件!
|
||||
# 将此配置中的 server 块复制到宝塔对应站点的配置中
|
||||
# 宝塔路径: /www/server/panel/vhost/nginx/trade.yuzhiran.com.conf
|
||||
# 将此 server 块复制到宝塔对应站点(宝塔路径: /www/server/panel/vhost/nginx/trade.yuzhiran.com.conf)
|
||||
#
|
||||
# 部署目录结构(/www/wwwroot/trade.yuzhiran.com/):
|
||||
# index.html <- 营销落地页(landing/ 产物)
|
||||
# robots.txt <- landing/robots.txt
|
||||
# sitemap.xml <- landing/sitemap.xml
|
||||
# app/ <- uni-app H5 构建产物(base: /app/)
|
||||
# workspace/ <- user-frontend 构建产物(base: /workspace/)
|
||||
# admin/ <- admin-frontend 构建产物(base: /admin/)
|
||||
# backend/ <- FastAPI 后端(由 supervisor/uvicorn 运行,经 /api/ 代理)
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
@@ -16,12 +24,11 @@ server {
|
||||
# SSL 证书(宝塔面板中配置,或取消注释以下行)
|
||||
# ssl_certificate /www/server/panel/vhost/cert/trade.yuzhiran.com/fullchain.pem;
|
||||
# ssl_certificate_key /www/server/panel/vhost/cert/trade.yuzhiran.com/privkey.pem;
|
||||
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
# ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
|
||||
# ssl_protocols TLSv1.2 TLSv1.3;
|
||||
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# 前端静态文件(uni-app build:h5 产物)
|
||||
root /www/wwwroot/trade.yuzhiran.com/frontend/dist;
|
||||
root /www/wwwroot/trade.yuzhiran.com;
|
||||
index index.html;
|
||||
|
||||
# gzip
|
||||
@@ -30,6 +37,26 @@ server {
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/plain text/css text/javascript application/json application/javascript image/svg+xml;
|
||||
|
||||
# 营销落地页(根路径,SEO 收录主入口)
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# 移动端 H5(uni-app, base: /app/)
|
||||
location /app/ {
|
||||
try_files $uri $uri/ /app/index.html;
|
||||
}
|
||||
|
||||
# 网页工作台(user-frontend, base: /workspace/)
|
||||
location /workspace/ {
|
||||
try_files $uri $uri/ /workspace/index.html;
|
||||
}
|
||||
|
||||
# 管理后台(admin-frontend, base: /admin/)
|
||||
location /admin/ {
|
||||
try_files $uri $uri/ /admin/index.html;
|
||||
}
|
||||
|
||||
# API 反向代理到后端
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
@@ -39,32 +66,20 @@ server {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 120s;
|
||||
proxy_send_timeout 120s;
|
||||
|
||||
# WebSocket 支持(如有需要)
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
# 上传文件(如有需要可配置单独的路径)
|
||||
# location /uploads/ {
|
||||
# alias /www/wwwroot/trade.yuzhiran.com/backend/uploads/;
|
||||
# expires 7d;
|
||||
# }
|
||||
|
||||
# SPA 路由 fallback
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# 静态资源缓存
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 30d;
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# 禁止访问隐藏文件
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
# 证书续期校验
|
||||
location ~ \.well-known {
|
||||
root /www/wwwroot/trade.yuzhiran.com;
|
||||
allow all;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user