Question

Optimize Nginx Configuration on Ubuntu 14.04

Hello! After installing LEMP on Ubuntu 14.04 with “one click applications” in my 512 droplet i want to optimize Nginx.

This tutorial required Debian >> How To Optimize Nginx Configuration

Is it advisable to follow the same steps of this tutorial to optimize Nginx on ubuntu 14.04?

Thanks!


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I think In this part of tutorial the " ; " is missing to close access_log off and the ngnix.conf fail

Logging Nginx logs every request that hits the VPS to a log file. If you use analytics to monitor this, you may want to turn this functionality off. Simply edit the access_log directive:

access_log off

I have a problem in this point with the Static File Caching:

location ~* .(jpg|jpeg|png|gif|ico|css|js)$ { expires 365d; }

If i put in /etc/nginx/nginx.conf “http” block fail,

Where should be placed?

Thanks

Hi!

As Ubuntu is based on Debian, they are largely the same on some levels. All the configurations described in that article should work just as well on an Ubuntu as a Debian one.

Let us know how it goes!