Post by pla1829 » Tue Jun 06, 2017 3:22 am

My server is running with nginx. I have configured a few settings including:

# enable gzip compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain application/javascript application/x-javascript text/xml text/css;
gzip_vary on;
# end gzip configuration

# expires headers
location ~* \\.(css|js|gif|jpeg|jpg|png|svg)$ {
expires 7d;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
try_files $uri @fallback;
}

Any other recommendations?

New member

Posts

Joined
Sat Nov 22, 2014 12:16 pm

Post by angelaary » Tue Aug 08, 2017 7:45 pm

First optimize worker_proccesses, how many cpu threads that you use, set it on worker_proccesses
example i have 4 core cpu with 8 threads;

Code: Select all

worker_processes  8;
after that optimize worker_connections,

Code: Select all

worker_connections  1024;
i usually use gzip compression level 2, not heavy for cpu

Code: Select all

gzip_comp_level 2;
add image/x-icon on your gzip type file

Code: Select all

gzip_types text/plain text/css application/javascript image/x-icon;

For better performance you have to optimizing your php server. Optimizing nginx will only give you little effects, just my opinion.

Newbie

Posts

Joined
Tue Aug 08, 2017 7:31 pm
Who is online

Users browsing this forum: No registered users and 4 guests