初始化1

This commit is contained in:
zg
2026-07-16 13:03:11 +08:00
parent 0bdfcbc1c8
commit e6b0f287cc
100 changed files with 12184 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
# ==========================================
# Vue 项目 Nginx 配置模板
# 配合 Dockerfile.vue 使用
# ==========================================
server {
listen 80;
server_name localhost;
# 日志格式
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# 站点根目录
root /usr/share/nginx/html;
index index.html;
# 静态资源长期缓存
location /assets/ {
expires 30d;
add_header Cache-Control "public, immutable";
}
# Vue Router history 模式支持
location / {
try_files $uri $uri/ /index.html;
}
# API 代理(如果有后端代理需求,可在此配置)
# location /api/ {
# proxy_pass http://backend-server:8080/;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# }
# Gzip 压缩
gzip on;
gzip_vary on;
gzip_comp_level 6;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/json
application/javascript
application/xml+rss
application/x-javascript
image/svg+xml;
gzip_min_length 1024;
gzip_proxied any;
}