Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lnmp 重新编译 nginx , 支持 brotli #24

Open
fisker opened this issue Mar 7, 2019 · 0 comments
Open

lnmp 重新编译 nginx , 支持 brotli #24

fisker opened this issue Mar 7, 2019 · 0 comments

Comments

@fisker
Copy link
Owner

fisker commented Mar 7, 2019

下载 ngx_brotli 模块

cd ~
git clone --recursive [email protected]:google/ngx_brotli.git

修改 nginx 编译参数

cd ~/lnmp1.6
vi lnmp.conf

Nginx_Modules_Options 增加

--add-module=/root/ngx_brotli

编译 nginx

./upgrade.sh nginx

输入
版本号后,等待安装完成即可

启用 Brotli, 修改 nginx 的配置文件 增加

# brotli
brotli on;
brotli_comp_level 6;
brotli_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;

更多指令查看 https://github.com/google/ngx_brotli#configuration-directives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant