Gzip javascript and css with NGinx

Nginx by default will only compress text/html content types. Heres how to gzip javascript and css with NGinx: In your nginx.conf file:

Or in your sites-enabled site file:

Reload nginx and your css and javascript files should now be gzip compressed. For more information on NGinx’s gzip module, look at http://wiki.nginx.org/NginxHttpGzipModule.