惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
V
V2EX
B
Blog RSS Feed
有赞技术团队
有赞技术团队
博客园 - Franky
美团技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
云风的 BLOG
云风的 BLOG
L
LangChain Blog
GbyAI
GbyAI
The Cloudflare Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
博客园 - 【当耐特】
The Register - Security
The Register - Security
大猫的无限游戏
大猫的无限游戏
D
Docker
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
N
Netflix TechBlog - Medium
博客园_首页
A
About on SuperTechFans
J
Java Code Geeks
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Recent Announcements
Recent Announcements
G
Google Developers Blog
小众软件
小众软件
博客园 - 叶小钗
WordPress大学
WordPress大学
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
F
Full Disclosure
Jina AI
Jina AI
H
Help Net Security

博客园 - 斌哥tobin

Go工程选择开源分库分表中间件可用性测试 Golang解决fatal error: all goroutines are asleep - deadlock! Laravel Model查询结果的3种存储格式内存占用对比 Laravel配置Route调用artisan 研究微信红包分配算法之Golang版 解决IDEA提示Untrusted Server's certificate 证书不可用( Server's certificate is not trusted ) select * 和 select 字段的速度对比 Docker镜像拉取失败或超时的解决办法:添加国内镜像 php连接docker运行的mysql,显示(HY000/2002): Connection refused的解决办法 VirtualBox虚拟CentOS7共享文件夹 Windows7用VirtualBox虚拟Ubuntu共享文件夹的终极方式 PhpStorm添加PHP代码规范检查CodeSniffer(phpcs)和PHP代码静态分析工具Mess Detector(phpmd) php的三个常用判断函数 php计算字符串长度 mac brew 安装php扩展报错:parent directory is world writable but not sticky Mac iTerm2命令行快捷操作 System.Web.AspNetHostingPermission 类型的权限已失败 优化phpstorm运行卡顿问题! composer [ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist - 斌哥tobin
nginx1.8安装nginx_concat_module及400错误解决办法
斌哥tobin · 2016-04-19 · via 博客园 - 斌哥tobin

2016-04-19 20:12  斌哥tobin  阅读(1681)  评论()    收藏  举报

nginx安装concat模块可以合并js,css等静态资源,减少http请求

在nginx源码目录执行命令:

./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_spdy_module --with-http_gzip_static_module --with-http_sub_module --add-module=../nginx-http-concat

make && make install

编译成功后还要注意合并js时的400 Bad Request错误

由于Nginx在新版本中,使用了标准的 MIME-Type:application/javascript。而在nginx_concat_module模块目前版本的代码中,写的是 application/x-javascript 的类型

修改 nginx-http-concat/ngx_http_concat_module.c

把 x-javascript 改为 javascript

重新编译nginx即可

nginx_concat_module下载地址:

https://github.com/alibaba/nginx-http-concat