在nginx.conf中 增加(我目录是/etc/nginx/nginx.conf)
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 9;
gzip_types application/octet-stream text/plain application/json application/javascript text/css application/xml text/javascript;
add_header Cache-Control no-store;
add_header Cache-Control no-cache;
本文介绍了如何通过修改Nginx配置文件来启用压缩功能,包括设置压缩级别、最小压缩长度等参数,还提供了缓存控制的相关配置。
965

被折叠的 条评论
为什么被折叠?



