How do I configure comporession with a ghost droplet

  • Posted December 14, 2013

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.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Yes, that is correct. Nginx does not have the concept of .htaccess files as it degrades performance (see <a href=“”></a>). <br> <br>To enable gzip, add this to <code>/etc/nginx/nginx.conf</code>, right after <code>http {</code>: <br><pre> gzip on; <br> gzip_disable “msie6”; <br> gzip_min_length 1400; <br> gzip_types text/plain text/css text/javascript text/xml application/x-javascript application/xml application/xml+rss; <br> </pre> <br> <br>Restart nginx: <pre>sudo service nginx restart</pre>