请问为什么我的nginx的gzip_static不起效呢?

nginx信息:

nginx version: nginx/1.15.1
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module

配置文件

include       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  logs/access.log  main;

sendfile        on;
keepalive_timeout  65;

gzip on;
gzip_comp_level 9;
gzip_types *;
gzip_vary on;
gzip_static on;
gzip_proxied expired no-cache no-store private auth;

使用-t验证结果

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

编译已加入模块,验证配置文件未出错,但是依旧无法静态压缩包,打开网页E-tag返回的还是W/开头,比较苦恼,是我配置文件写的不对吗

阅读 1.8k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题