By paul352319
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Yes, that is correct. Nginx does not have the concept of .htaccess files as it degrades performance (see <a href=“http://wiki.nginx.org/LikeApache-htaccess”>http://wiki.nginx.org/LikeApache-htaccess</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>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.