Comments (3)
响应的content-type是什么?可能需要配置一下_concat_types_
On 2013/12/19 9:57, elover wrote:
nginx 的版本:
mactekiMacBook-Pro-3:~ mac$ nginx -V
nginx version: nginx/1.5.7
built by clang 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=www --group=www
--with-http_ssl_module --with-http_sub_module --with-http_dav_module
--with-http_flv_module --with-http_gzip_static_module
--with-http_stub_status_module --http-proxy-temp-path=/var/nginx/proxy
--http-fastcgi-temp-path=/var/nginx/fastcgi
--http-client-body-temp-path=/var/nginx/client
--add-module=nginx-http-concatnginx.conf设置:
location /sea-modules/ {
concat on;
concat_max_files 20;
}
文件目录就是html-->index+sea-modules浏览器报错提示:
Request
URL:http://localhost/sea-modules/arale/??class/1.1.0/class.js,events/1.1.0/events.js
Request Method:GET
Status Code:400 Bad Request紧急求助,还望各位大牛能帮我解答一下
—
Reply to this email directly or view it on GitHub
#16.
Thanks
-YWB
from nginx-http-concat.
I have same problem with js files too
curl -I http://ghost.centminmod.com/assets/js/??slimbox2.js,highlight.js
HTTP/1.1 400 Bad Request
Server: nginx centminmod
Date: Thu, 19 Dec 2013 05:59:10 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
did try using
concat_types text/css text/html application/javascript;
but did not work still get 400 bad requests
But no problems with css files
curl -I http://ghost.centminmod.com/assets/css/??screen.css,normalize.css,purecasper.css,ss.css,kb.css,sb.css
HTTP/1.1 200 OK
Server: nginx centminmod
Date: Thu, 19 Dec 2013 05:59:43 GMT
Content-Type: text/css
Connection: keep-alive
Last-Modified: Wed, 18 Dec 2013 05:20:24 GMT
Vary: Accept-Encoding
Expires: Sat, 18 Jan 2014 04:13:59 GMT
Cache-Control: max-age=2592000
Pragma: public
Cache-Control: public, must-revalidate, proxy-revalidate
Content-Encoding: gzip
Extended-Cache: 1
X-PCache-Status: HIT
Nginx configuration on CentOS 6.4 64bit KVM based VPS
nginx version: nginx/1.5.7
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/sbin --conf-path=/usr/local/nginx/conf/nginx.conf --add-module=../ngx_pagespeed-release-1.6.29.5-beta --with-http_spdy_module --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module --with-http_addition_module --with-http_secure_link_module --with-http_flv_module --with-http_realip_module --with-libatomic --with-pcre=../pcre-8.33 --with-pcre-jit --with-http_dav_module --add-module=../nginx-dav-ext-module-0.0.2 --add-module=../ngx-fancyindex-ngx-fancyindex --add-module=../ngx_cache_purge-2.1 --add-module=../nginx-accesskey-2.0.3 --with-openssl=../openssl-1.0.1e --add-module=../nginx-http-concat-master --with-openssl-opt=enable-tlsext
vhost
location /assets/css/ {
root /home/nginx/domains/ghost.centminmod.com/ghost/content/themes/casper;
concat on;
concat_max_files 20;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
expires 30d;
}
location /assets/js/ {
root /home/nginx/domains/ghost.centminmod.com/ghost/content/themes/casper;
concat on;
#concat_types text/css text/html application/javascript;
concat_max_files 20;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
expires 30d;
}
from nginx-http-concat.
非常感谢哈,设置一下concat_types为application/javascript;就可以了,thank you!
from nginx-http-concat.
Related Issues (20)
- concat_delimiter 无法使用 HOT 2
- nginx: [emerg] unknown directive "concat_mac_files" in /usr/local/nginx/conf/nginx.conf:35
- 怎么知道nginx-http-concat模块编译进了nginx
- 如何可以确定我的nginx-http-concat模块编译进了我的nginx了? HOT 4
- 在合并多个文件的容错 HOT 4
- 403 Forbidden错误 HOT 1
- 对js中的注释代码块的解析能力不好 HOT 1
- 配置项不能指定root目录吗?
- 【已解决】一直遇到400错误,合并请求的时候 HOT 3
- 那些情况下适用?如果适用了cdn有没有必要做合并?
- 第一次用nginx_http_concat 发现了一些问题
- nginx-http-concat 和 nginx反向代理 proxy_pass 能否兼容? HOT 2
- nginx-http-concat是否支持Https HOT 2
- 该模块不支持nginx-1.12? HOT 6
- root目前只支持绝对地址吗? HOT 1
- 能支持 nginx 的 add-dynamic-module 安装吗?
- 问一下nginx是通过homebrew安装的,怎么装这个模块? HOT 2
- Concatenating upstream responses HOT 2
- ??的形式可否支持自定义呢 HOT 1
- aws cloudfront的cdn好像403,是不支持吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-http-concat.