Giter VIP home page Giter VIP logo

Comments (3)

yaoweibin avatar yaoweibin commented on May 9, 2024

响应的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-concat

nginx.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.

vbtechsupport avatar vbtechsupport commented on May 9, 2024

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.

elover avatar elover commented on May 9, 2024

非常感谢哈,设置一下concat_types为application/javascript;就可以了,thank you!

from nginx-http-concat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.