Enable gzip compression on Elastic Beanstalk with nginx
Create nginx_gzip_configuration.config file into .ebextensions directory and then put the following script. files: "/etc/nginx/conf.d/gzip.conf": mode: "644" owner: "root" group: "root" content: | # enable gzip compression gzip on; gzip_min_length 1100; gzip_buffers 4 32k; gzip_types text/plain text/html text/xml text/css application/javascript application/json; gzip_vary on; # end gzip configuration container_commands: 02_restart_nginx: command: service nginx restart