# CmsPro Nginx 伪静态配置
# 将以下内容添加到站点 server 块中

# 核心：Laravel URL 重写规则
location / {
    try_files $uri /index.php?$query_string;
}

# 禁止访问隐藏文件（.env、.git 等），允许 .well-known
location ~ /\.(?!well-known).* {
    deny all;
}

# 上传目录禁止执行 PHP（安全加固）
location ~* ^/Uploads/.*\.php$ {
    deny all;
}

# 静态资源长期缓存（30 天）
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
    expires 30d;
    add_header Cache-Control "public, immutable";
    access_log off;
}
