简体   繁体   English

Nginx在HTTPS上没有Gzip-仅HTTP

[英]Nginx No Gzip on HTTPS - Only HTTP

I cannot seem to find why this is happening. 我似乎找不到原因。

Installed Nginx 1.10.3 on Ubuntu 16.04 via apt, enabled gzip in my nginx.conf: 通过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;

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

Are there any configuration options I am missing out for HTTPS gzip? 我缺少HTTPS gzip的任何配置选项吗?

  • Also, I am aware of the vulnerabilities of gzip over https on Nginx, however I am still required to get this working! 另外,我知道Nginx上gzip超过https的漏洞,但是仍然需要执行此操作!

  • Yes, I have googled and searched Stack Overflow for duplicate issues. 是的,我已经在Google搜索和搜索Stack Overflow中发现了重复的问题。

I managed to resolve this by moving from an Ubuntu build to a CentOS build. 我设法通过从Ubuntu构建迁移到CentOS构建来解决此问题。

I did not discover what was causing the lack of headers being sent on Ubuntu. 我没有发现是什么原因导致缺少在Ubuntu上发送的标头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM