Welcome! Log In Create A New Profile

Advanced

gzip_types docx xlsx problem

Posted by rocklee44 
gzip_types docx xlsx problem
December 08, 2015 01:52AM
Hi all,
I'm using Nginx 1.8 build from source , Centos 6.4 64 bit, when I try to gzip_type directive in my virtualhost.conf I got error, I cannot restart Nginx:
<code>
# if congiguration is :
gzip on;
gzip_comp_level 9;
gzip_min_length 1024;
gzip_types text/plain text/css application/xml application/javascript image/jpeg image/x-icon image/gif image/png video/jpeg image/bmp image/tiff application/vnd.ms-excel application/vnd.openxmlformats-officedocument.wordprocessingml.document;
gzip_disable "MSIE [1-6]\.";
# I got error when restart nginx
nginx: [emerg] could not build the test_types_hash, you should increase test_types_hash_bucket_size: 64
nginx: configuration file /opt/nginx/conf/nginx.conf test failed

# I exclude application/vnd.ms-excel application/vnd.openxmlformats-officedocument.wordprocessingml.document from gzip_types I can restart Nginx normally
gzip on;
gzip_comp_level 9;
gzip_min_length 1024;
gzip_types text/plain text/css application/xml application/javascript image/jpeg image/x-icon image/gif image/png video/jpeg image/bmp image/tiff application/vnd.ms-excel;
gzip_disable "MSIE [1-6]\.";
</code>
I tried
<code>
server_names_hash_bucket_size 128;
server_names_hash_max_size 1024;
</code>
But it still not working, please give me some advice.
Thank you very much.
Re: gzip_types docx xlsx problem
March 05, 2018 01:21AM
Hi,

Did you found any solution for this? I am facing the same issue.

Thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 270
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready