Log into EC2 instance on Amazon AWS.
Edit the /etc/nginx/nginx.conf
file to add the following within the sever {} object:
gzip on;
gzip_comp_level 4; # or whatever you want
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
Then restart nginx:
service nginx restart