Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user www-data;
- worker_processes auto;
- pid /run/nginx.pid;
- timer_resolution 100ms; # Уменьшает разрешение таймеров времени в рабочих процессах, за счёт чего уменьшается число системных вызовов
- worker_rlimit_nofile 500000; # Изменяет ограничение на максимальное число открытых файлов (RLIMIT_NOFILE) для рабочих процессов
- worker_priority -5; # Выставляем более высокий приоритет процессу воркера
- error_log /var/log/nginx/error-crit.log crit;
- events {
- worker_connections 300000;
- multi_accept on;
- use epoll;
- }
- http {
- ##
- # Basic Settings
- ##
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 5 5;
- client_max_body_size 256M;
- client_body_buffer_size 1m;
- client_body_timeout 10;
- client_header_timeout 10;
- send_timeout 10;
- types_hash_max_size 2048;
- server_tokens off;
- server_names_hash_bucket_size 100;
- server_name_in_redirect off;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- ##
- # Adjust output buffers
- ##
- fastcgi_buffers 256 16k;
- fastcgi_buffer_size 128k;
- fastcgi_connect_timeout 3s;
- fastcgi_send_timeout 120s;
- fastcgi_read_timeout 120s;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- reset_timedout_connection on;
- ##
- # Cache information about frequently accessed files
- ##
- open_file_cache max=2000 inactive=20s;
- open_file_cache_valid 60s;
- open_file_cache_min_uses 5;
- open_file_cache_errors off;
- ##
- # SSL Settings
- ##
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
- ssl_prefer_server_ciphers on;
- ##
- # Logging Settings
- ##
- access_log off;
- log_not_found off;
- ##
- # Gzip Settings
- ##
- gzip on;
- gzip_disable "msie6";
- gzip_vary on;
- gzip_proxied any;
- gzip_comp_level 3;
- gzip_min_length 1100;
- gzip_buffers 64 8k;
- gzip_http_version 1.1;
- gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
- ##
- # Virtual Host Configs
- ##
- include /etc/nginx/conf.d/*.conf;
- include /etc/nginx/sites-enabled/*;
- }
Advertisement
Add Comment
Please, Sign In to add comment