【问题标题】:Nginx No Gzip on HTTPS - Only HTTPNginx 在 HTTPS 上没有 Gzip - 只有 HTTP
【发布时间】:2018-03-31 03:43:09
【问题描述】:

我似乎无法找到发生这种情况的原因。

通过 apt 在 Ubuntu 16.04 上安装 Nginx 1.10.3,在我的 nginx.conf 中启用 gzip:

##
# Gzip Settings
##

gzip on;
gzip_vary off;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml image/gif image/jpeg image/png image/tiff image/vnd.wap.wbmp image/x-icon image/x-jng image/x-ms-bmp image/svg+xml image/webp
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 8;
gzip_buffers 16 8k;
gzip_http_version 1.1;

这适用于 HTTP,但不适用于 HTTPS: https://checkgzipcompression.com/?url=http%3A%2F%2Fjkrb.stream

HTTPS gzip 有没有我遗漏的配置选项?

  • 另外,我知道在 Nginx 上 gzip over https 的漏洞,但是我仍然需要让它工作!

  • 是的,我已经在 Stack Overflow 上搜索并搜索了重复的问题。

【问题讨论】:

    标签: ubuntu nginx https compression gzip


    【解决方案1】:

    我设法通过从 Ubuntu 构建迁移到 CentOS 构建来解决这个问题。

    我没有发现是什么导致了 Ubuntu 上缺少发送的标头。

    【讨论】:

      猜你喜欢
      • 2016-06-27
      • 2016-07-06
      • 2016-08-10
      • 1970-01-01
      • 2016-04-27
      • 2019-02-01
      • 2015-06-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多