موارد رو داخل فایل کانفیگش بذارید مشکلتون حل میشه البته بهینه سازی بشه مورد حل میشه

user nobody;
# no need for more workers in the ***** mode
worker_processes auto;
error_log /var/log/nginx/error.log warn;
worker_rlimit_nofile 20480;
events {
worker_connections 1024; # increase for busier servers
use epoll; # you should use epoll here for Linux kernels 2.6.x
}
http {
server_name_in_redirect off;
server_names_hash_max_size 10240;
server_names_hash_bucket_size 1024;
include mime.types;
default_type application/octet-stream;
server_tokens off;
# remove/commentout disable_symlinks if_not_owner;if you get Permission denied error
# disable_symlinks if_not_owner;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
gzip on;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
gzip_proxied expired no-cache no-store private auth;
gzip_http_version 1.0;
gzip_min_length 1000;
gzip_comp_level 2;
gzip_buffers 16 8k;
# You can remove image/png image/x-icon image/gif image/jpeg if you have slow CPU
gzip_types text/plain application/x-javascript text/xml text/css application/xml;
ignore_invalid_headers on;
client_header_timeout 12m;
client_body_timeout 12m;
send_timeout 10m;
reset_timedout_connection on;
connection_pool_size 256;
client_header_buffer_size 1k;
large_client_header_buffers 4 32k;
client_max_body_size 8M;
client_body_buffer_size 10k;
request_pool_size 32k;
output_buffers 4 32k;
postpone_output 1460;
*****_temp_path /tmp/nginx_*****/;
*****_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:15m inactive=24h max_size=500m;
client_body_in_file_only on;
log_format bytes_log "$msec $bytes_sent .";
log_format custom_microcache '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" nocache:$no_cache';
include "/etc/nginx/vhosts/*";
}