nginx brotli压缩

释放双眼,带上耳机,听听看~!

nginx brotli压缩

宝塔添加编译模块

ngx_brotli

ngx_brotli 压缩模块

–add-module=/www/server/ngx_brotli

cd /www/server
git clone https://github.com/google/ngx_brotli
cd ngx_brotli 
git submodule update –init

https://github.com/google/ngx_brotli

 

宝塔面板网站配置添加

 # brotli压缩
   brotli on;              #启用
   brotli_comp_level 6;    #压缩等级,默认6,最高11,太高的压缩水平可能需要更多的CPU
   brotli_buffers 16 8k;   #请求缓冲区的数量和大小
   brotli_min_length 20;   #指定压缩数据的最小长度
   brotli_static always;   #查找预处理好的、以.br结尾的压缩文件,可选值为on、off、always
   brotli_window 512k;     #窗口值,默认值为512k
   brotli_types application/atom+xml 
                application/x-javascript
                application/javascript 
                application/json 
                application/rss+xml
                application/vnd.ms-fontobject 
                application/x-font-opentype 
                application/x-font-truetype
                application/x-font-ttf 
                application/font-woff 
                application/xhtml+xml 
                application/xml
                font/eot font/opentype 
                font/otf font/truetype 
                image/svg+xml 
                image/vnd.microsoft.icon
                image/x-icon 
                image/jpeg 
                image/gif 
                image/png 
                image/bmp
                image/svg 
                image/x-win-bitmap 
                text/css 
                text/javascript 
                text/plain
                text/xml;
   

 

给TA打赏
共{{data.count}}人
人已打赏
WordPress 教程

记录一次WordPress 502 Bad Gateway 解决方法

2022-4-16 10:47:29

WordPress 教程

WordPress网站忘记密码怎么办?

2019-5-20 11:20:52

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索