server {
    listen 8000;
    server_name _;
    root /usr/share/nginx/html;
    index index.html;

    # 处理静态文件
    location / {
        try_files $uri $uri/ =404;
    }

    # 压缩配置
    gzip on;
    gzip_types text/plain text/css application/javascript application/json;
    gzip_min_length 1000;

    # 缓存配置
    location ~* \.(css|js|png|jpg|jpeg|gif|ico)$ {
        expires 30d;
        add_header Cache-Control "public, no-transform";
    }
}
