nginx.conf (2111B)
1 user www-data; 2 worker_processes auto; 3 worker_cpu_affinity auto; 4 pid /run/nginx.pid; 5 worker_rlimit_nofile 100000; 6 error_log stderr; 7 include /etc/nginx/modules-enabled/*.conf; 8 9 events { 10 worker_connections 4000; 11 use epoll; 12 multi_accept on; 13 } 14 15 http { 16 # cache informations about FDs, frequently accessed files 17 # can boost performance, but you need to test those values 18 open_file_cache max=200000 inactive=20s; 19 open_file_cache_valid 30s; 20 open_file_cache_min_uses 2; 21 open_file_cache_errors on; 22 23 fastcgi_buffering off; 24 proxy_buffering off; 25 fastcgi_keep_conn on; 26 fastcgi_max_temp_file_size 0; 27 28 29 ## 30 # Basic Settings 31 ## 32 33 sendfile on; 34 tcp_nopush on; 35 tcp_nodelay on; 36 types_hash_max_size 2048; 37 server_tokens off; # Recommended practice is to turn this off 38 39 reset_timedout_connection on; 40 client_body_timeout 60; 41 send_timeout 5; 42 keepalive_timeout 30; 43 44 # server_names_hash_bucket_size 64; 45 # server_name_in_redirect off; 46 47 include /etc/nginx/mime.types; 48 default_type application/octet-stream; 49 50 ## 51 # SSL Settings 52 ## 53 54 ssl_protocols TLSv1.2 TLSv1.3; # Dropping SSLv3 (POODLE), TLS 1.0, 1.1 55 ssl_prefer_server_ciphers off; # Don't force server cipher order. 56 57 ## 58 # Logging Settings 59 ## 60 61 access_log stdout; 62 63 ## 64 # Gzip Settings 65 ## 66 67 gzip on; 68 69 gzip_vary on; 70 gzip_proxied any; 71 gzip_comp_level 6; 72 gzip_buffers 16 8k; 73 gzip_http_version 1.1; 74 gzip_types image/png font/woff2 text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; 75 76 77 ## 78 # Virtual Host Configs 79 ## 80 81 include /etc/nginx/conf.d/*.conf; 82 include /etc/nginx/sites-enabled/*; 83 } 84 85 86 #mail { 87 # # See sample authentication script at: 88 # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript 89 # 90 # # auth_http localhost/auth.php; 91 # # pop3_capabilities "TOP" "USER"; 92 # # imap_capabilities "IMAP4rev1" "UIDPLUS"; 93 # 94 # server { 95 # listen localhost:110; 96 # protocol pop3; 97 # proxy on; 98 # } 99 # 100 # server { 101 # listen localhost:143; 102 # protocol imap; 103 # proxy on; 104 # } 105 #}