优化项目结构

This commit is contained in:
canglan committed 2026-05-06 18:25:44 +08:00
1 parent 01594dba7a
commit bdedf1a0cf
21 files changed
+7 -9

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ chown -R www:www .
```bash
chown -R www-data:www-data /path/to/ai-chat
chmod 755 /path/to/ai-chat/uploads
chmod 755 /path/to/ai-chat/public/uploads
chmod 755 /path/to/ai-chat/config
```
+2 -2
View File
@@ -56,13 +56,13 @@ location /api/chat/completions {
fastcgi_read_timeout 300s;
}
# 4. 静态资源缓存
# 4. 静态资源缓存(assets/ 和 uploads/ 已在 public 目录下,无需 alias)
location /assets/ {
expires 30d;
add_header Cache-Control "public, immutable";
}
# 5. 上传文件访问
# 5. 上传文件缓存
location /uploads/ {
expires 7d;
add_header Cache-Control "public";
+2 -4
View File
@@ -71,16 +71,14 @@ server {
fastcgi_read_timeout 300s;
}
# 静态资源直接服务
# 静态资源缓存
location /assets/ {
alias /path/to/ai-chat/assets/;
expires 30d;
add_header Cache-Control "public, immutable";
}
# 上传文件直接服务
# 上传文件缓存
location /uploads/ {
alias /path/to/ai-chat/uploads/;
expires 7d;
add_header Cache-Control "public";
}