nginx gzip_static not following gzip_types

ctrlbrk nginx-forum at nginx.us
Tue Apr 24 06:13:54 UTC 2012


The directive gzip_static does not follow the rules in gzip_types


    gzip on;
    gzip_static on;
    gzip_http_version 1.0;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
    gzip_comp_level 5;
    gzip_min_length 1000;
    gzip_vary on;
    gzip_buffers 64 16k;
    gzip_types text/plain application/xml text/css
application/javascript application/x-javascript text/javascript;

#strace

open("/var/www/forum/images/smilies/attention.gif.gz",
O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
open("/var/www/forum/images/smilies/lookoutbelow.gif",
O_RDONLY|O_NONBLOCK) = 319
open("/var/www/forum/images/smilies/lookoutbelow.gif.gz",
O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
open("/var/www/forum/images/smilies/heresyoursign.gif",
O_RDONLY|O_NONBLOCK) = 320
open("/var/www/forum/images/smilies/heresyoursign.gif.gz",
O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
open("/var/www/forum/images/smilies/woohooo.gif", O_RDONLY|O_NONBLOCK) =
321
open("/var/www/forum/images/smilies/woohooo.gif.gz",
O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
open("/var/www/forum/images/smilies/ohno.gif", O_RDONLY|O_NONBLOCK) =
322
open("/var/www/forum/images/smilies/ohno.gif.gz", O_RDONLY|O_NONBLOCK) =
-1 ENOENT (No such file or directory)

As you can see, it is looking for .gz images even though the gzip_types
excludes images.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,225692,225692#msg-225692



More information about the nginx mailing list