nginx1.6下安装nginx_concat_module报400错误
2015-04-13 18:49
423 查看
第一次安装都很顺利,第二次安装就出现访问合并链接出现400错误。
瞬间就跪了,果断google之,居然有前人也碰到这样的问题,有救了。
由于Nginx在新版本中,使用了标准的 MIME-Type:application/javascript。而在nginx_concat_module模块目前版本的代码中,写的是 application/x-javascript 的类型。
也就是模块认不到js文件了。。。
因此,我们最好在向nginx添加该模块之前,修改nginx_concat_module的源代码文件ngx_http_concat_module.c,将application/x-javascript更改为application/javascript,然后再编译安装即可!
瞬间就跪了,果断google之,居然有前人也碰到这样的问题,有救了。
由于Nginx在新版本中,使用了标准的 MIME-Type:application/javascript。而在nginx_concat_module模块目前版本的代码中,写的是 application/x-javascript 的类型。
也就是模块认不到js文件了。。。
Source code |
[root@tools-ops01-jz src]# grep javascript nginx_concat_module/ngx_http_concat_module.c ngx_string("application/x-javascript"),
因此,我们最好在向nginx添加该模块之前,修改nginx_concat_module的源代码文件ngx_http_concat_module.c,将application/x-javascript更改为application/javascript,然后再编译安装即可!
相关文章推荐
- nginx安装nginx_concat_module模块报400错误的问题
- nginx 下安装nginx_concat_module报400错误
- [linux] Nginx编译安装错误error: the HTTP rewrite module requires the PCRE library
- NGINX_CONCAT_MODULE 安装和配置(静态文件打包下载)
- nginx_concat_module 安装和配置
- Nginx编译安装错误error: the HTTP gzip module requires the zlib library
- nginx安装错误 ./configure: error: the HTTP rewrite module requires the PCRE library.
- ubuntu下安装nginx错误error: the HTTP rewrite module requires the PCRE library 解决方法
- nginx_concat_module 安装和配置
- Nginx编译安装第三方模块http_substitutions_filter_module
- 如何安装nginx第三方模块--add-module
- nginx入门学习—— 在已安装好的nginx上添加nginx_upstream_check_module模块(三)
- Eclipse Maven 编译错误 Dynamic Web Module 3.0 requires Java 1.6 or newer 解决方案
- Mac OS安装nginx with nginx-stick-module-ng
- LNMP一键安装包的Nginx 502 Bad Gateway错误可能原因及解决方法
- FastDFS(1):Centos7 安装FastDFS+nginx module
- Eclipse Maven 编译错误 Dynamic Web Module 3.0 requires Java 1.6 or newer 解决方案
- 安装nginx_upstream_check_module时make出错,求助
- nginx 安装 lua-nginx-module
- linux上安装fastdfs+nginx+ngin-module实践并解决多个异常篇