Question

Optimize Nginx Configuration on Ubuntu 14.04

Posted September 17, 2014 5.4k views

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!

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.

×
3 answers

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!

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

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

Submit an Answer