Nginx配置优化说明(2)

# Log Format
    log_format main '$remote_addr - $remote_user [$time_local] '
            '"$request" $status $body_bytes_sent "$http_referer" '
            '"$http_user_agent" "$http_x_forwarded_for"';
 
    # Gzip Settings
    gzip on;
    gzip_static on;
    gzip_disable "MSIE [1-6]\.";
    gzip_vary on;
    gzip_proxied any;
    # gzip_proxied expired no-cache no-store private auth;
    gzip_comp_level 2;
    gzip_min_length 5000;
    gzip_http_version 1.1;
    gzip_buffers 16 8k;
    gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml  application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
    ignore_invalid_headers on;

#Virtual Host configs
    include conf.d/*;
    include sites-enabled/*.conf;
}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6b6c26fe290063c35973710aa1393aa3.html