图片:
在windows10 wifi:name1中,gzip不起作用
在 windows10 wifi:name2 中,gzip 有效
我的 nginx 配置:
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;
}
}
我已经关闭了缓存,那么,nginx gzip 压缩工作和网络有关系吗?
怎么解决这个问题?为什么tomcat8没有这个问题?