nginx配置
gzip on;
gzip_min_length 1k;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
server {
listen 80;
server_name **.com
return 301 https://www.**.com$request_uri;
}
server {
listen 443;
server_name **.com
ssl on;
ssl_certificate **
ssl_certificate_key **
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers **
ssl_prefer_server_ciphers on;
if ($ssl_protocol = "") {
rewrite ^(.*) https://$host$1 permanent;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
root /www/html;
index index.html index.htm;
}
}
看下
/etc/nginx/conf.d/
里还有哪个文件配置了gzip on;
去掉即可
另:
gzip_types
为何要配置图片类型……