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 this.

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;