Enable “Vary: Accept-Encoding” in NGINX VestaCP

Very quick one here – a lot of speed testing websites such as Pingdom and Google PageSpeed require you to enable “Vary: Accept-Encoding”.

And because it’s sooo simple to turn on in NGINX here’s how you do it:

Modify the file /etc/nginx/nginx.conf and add gzip_vary on; to the file (preferably under the gzip compression section).

# Compression
gzip                on;
gzip_comp_level     5;
gzip_min_length     512;
gzip_buffers        8 64k;
gzip_types          text/plain text/css text/javascript
                    application/x-javascript application/javascript;
gzip_proxied        any;
gzip_vary           on;

 

Leave a Reply

Your email address will not be published. Required fields are marked *

 

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>