How do I configure comporession with a ghost droplet

December 14, 2013 3.2k views
Am I right in saying that, insetad of using htaccess, i should configure: etc/nginx/nginx.conf file in order to enable compression (gzip or deflate) and other such tweaks that I ma used to doing with htaccess. I am using a droplet pre-configured with the one click ghost blog installation. Many thanks.
1 Answer
Yes, that is correct. Nginx does not have the concept of .htaccess files as it degrades performance (see

To enable gzip, add this to /etc/nginx/nginx.conf, right after http {:
        gzip  on;

gzip_disable "msie6";
gzip_min_length 1400;
gzip_types text/plain text/css text/javascript text/xml application/x-javascript application/xml application/xml+rss;

Restart nginx:
sudo service nginx restart
Have another answer? Share your knowledge.