上一篇:
nginx启动关闭重启脚本

在搭建squid网页加速的时候,对于大的css 或者js要进行压缩,然后再进行缓存,这样能够提高减小下载量提高页面响应速度。如果你用的是squid 3.0以前的版本并且用的是 ngnix server的话可能会碰到如下问题: 不用squid直接打开页面则客户端返回的是压缩的状态,如果启用squid加速会发现下载下来的页面不是压缩状态。这里面主要是没有启动ngnix 的静态缓存模块(ngx_http_gzip_static_module)导致。打开静态缓存问题就解决了
1.nginx编译选项
./configure --with-http_gzip_static_module
2.修改nginx.conf
gzip_static on;
gzip_http_version 1.1;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6] \.";
gzip_vary on;
参考:
1.http://wiki.nginx.org/NginxHttpGzipStaticModule
2.http://bbs.chinaunix.net/viewthread.php?tid=1329820
GEZ鸽子
2010/01/21 13:11
来看看!
分页: 1/1
1

