feat(fsgx): 管理后台与部署相关更新
- admin: 路由守卫修复空白页、addRoute、devServer 端口与代理 - admin: package.json 生产构建去掉 NODE_OPTIONS openssl - ajcaptcha: 滑块验证码改用 file 缓存避免 Redis NOAUTH - nginx-crmeb: 增加 81 端口站点 - docs: deploy 补充 NOAUTH/Redis 说明,新增 H5 部署脚本与 nginx 示例 - 其他: database、start-api、swoole ini、uniapp 资源等 Made-with: Cursor
This commit is contained in:
34
docs/nginx-hjf-cloud.conf.example
Normal file
34
docs/nginx-hjf-cloud.conf.example
Normal file
@@ -0,0 +1,34 @@
|
||||
# 云服务器 hjf.suzhouyuqi.com 站点 Nginx 配置示例
|
||||
# 用于宝塔/LNMP:复制到站点配置或 include 使用
|
||||
# 关键:root 指向 public,静态文件 /static/、/assets/、/pages/ 由 Nginx 直接提供
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl http2;
|
||||
server_name hjf.suzhouyuqi.com;
|
||||
root /www/wwwroot/hjf.suzhouyuqi.com/public;
|
||||
index index.html index.php;
|
||||
|
||||
# SSL 证书(宝塔通常自动配置)
|
||||
# ssl_certificate ...
|
||||
# ssl_certificate_key ...
|
||||
|
||||
# H5 静态资源:直接由 Nginx 提供,避免返回 HTML 导致 "Unexpected token '<'"
|
||||
location ~ ^/(static|assets|pages)/ {
|
||||
try_files $uri =404;
|
||||
expires 7d;
|
||||
}
|
||||
|
||||
# PHP 请求(按现有 Swoole/php-fpm 配置)
|
||||
location ~ \.php$ {
|
||||
proxy_pass http://127.0.0.1:20199;
|
||||
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 / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user