0

Pictures:

In centos7 gzip works

In windows10 wifi:name1, gzip does not work

In windows10 wifi:name2, gzip works

But tomcat 8 gzip works in all places

My nginx config:

user  nginx;
worker_processes  1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request"'
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout 65;

    gzip on;
    gzip_proxied any;
    gzip_types
      text/css
      text/javascript
      text/xml
      text/plain
      application/javascript
      application/x-javascript
      application/json;




    server {
    listen       80;
    server_name  lrs.sout.fun;
    location / {
        proxy_pass  http://lrs:8060;
        index  index.html index.htm;
    }
   }

    server {
    listen       80;
    server_name  jenkins.sout.fun;
    location / {
        proxy_pass  http://jenkins:8080;
        index  index.html index.htm;
    }
}

I have disabled the cache. so,is nginx gzip compression work related with network?

How to solve this problem? Why tomcat8 doesn't have this problem?

drookie
  • 8,625
  • 1
  • 19
  • 29
  • 2
    Notice the gzipless response doesn't have the *Server:* header with nginx version while others do; this is the main indicator of your problem. Anyway, gzip compression isn't related to the l2 media, such as cable or radio. – drookie Jan 13 '19 at 16:28
  • 1
    Something appears to have intercepted your connection. Always use https. – Michael Hampton Jan 13 '19 at 16:39
  • The final reason was that our router was implanted with virus. – liunewshine Jan 28 '19 at 01:45

0 Answers0