Nginx下实现gzip静态文件压缩

2009-02-04 xiao H Posted in 服务器应用

别地方抄来的留个备份
nginx要修改两处,在虚拟主机配置段中添加:

location ~* ^.+.gzjs$ {
add_header Content-Encoding gzip;
gzip off;
}

另外再修改nginx的mime文件,在application/x-javascript js;中添加gzjs

application/x-javascript js gzjs;




标签:,

还没有评论呢。

我来说两句

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">