Files
shaguabijia-app-server/deploy/nginx/app-api.shaguabijia.com.conf
马润林 1aafc28621 feat: 正式 App 后端登录模块 v0.1.0
引入 JWT 认证、极光一键登录、短信 mock 登录与用户表,并补充技术实施文档与部署配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 17:37:18 +08:00

34 lines
939 B
Plaintext

# 80 → 301 → 443
server {
listen 80;
listen [::]:80;
server_name app-api.shaguabijia.com;
return 301 https://$host$request_uri;
}
# 443 SSL 反代到本地 uvicorn (127.0.0.1:8770)
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name app-api.shaguabijia.com;
ssl_certificate /etc/nginx/ssl/app-api.shaguabijia.com.pem;
ssl_certificate_key /etc/nginx/ssl/app-api.shaguabijia.com.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_session_cache shared:SSL:10m;
client_max_body_size 4m;
location / {
proxy_pass http://127.0.0.1:8770;
proxy_http_version 1.1;
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_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 30s;
}
}