1
|
#######################################################################
|
2
|
#
|
3
|
# This is the main Nginx configuration file.
|
4
|
#
|
5
|
# More information about the configuration options is available on
|
6
|
# * the English wiki - http://wiki.nginx.org/Main
|
7
|
# * the Russian documentation - http://sysoev.ru/nginx/
|
8
|
#
|
9
|
#######################################################################
|
10
|
|
11
|
#----------------------------------------------------------------------
|
12
|
# Main Module - directives that cover basic functionality
|
13
|
#
|
14
|
# http://wiki.nginx.org/NginxHttpMainModule
|
15
|
#
|
16
|
#----------------------------------------------------------------------
|
17
|
|
18
|
user nobody;
|
19
|
worker_processes 4;
|
20
|
error_log /var/log/nginx/error.log debug;
|
21
|
worker_rlimit_nofile 8192;
|
22
|
|
23
|
events {
|
24
|
worker_connections 1024; # you might need to increase this setting for busy servers
|
25
|
use epoll; # Linux kernels 2.6.x change to epoll
|
26
|
}
|
27
|
|
28
|
http {
|
29
|
server_names_hash_max_size 2048;
|
30
|
server_names_hash_bucket_size 512;
|
31
|
server_tokens off;
|
32
|
|
33
|
include mime.types;
|
34
|
default_type application/octet-stream;
|
35
|
|
36
|
sendfile on;
|
37
|
tcp_nopush on;
|
38
|
tcp_nodelay on;
|
39
|
keepalive_timeout 10;
|
40
|
|
41
|
# Gzip on
|
42
|
gzip on;
|
43
|
gzip_min_length 1100;
|
44
|
gzip_buffers 4 32k;
|
45
|
gzip_types text/plain application/x-javascript text/xml text/css;
|
46
|
|
47
|
# Other configurations
|
48
|
ignore_invalid_headers on;
|
49
|
client_max_body_size 8m;
|
50
|
client_header_timeout 3m;
|
51
|
client_body_timeout 3m;
|
52
|
send_timeout 3m;
|
53
|
connection_pool_size 256;
|
54
|
client_header_buffer_size 4k;
|
55
|
large_client_header_buffers 4 32k;
|
56
|
request_pool_size 4k;
|
57
|
output_buffers 4 32k;
|
58
|
postpone_output 1460;
|
59
|
|
60
|
# Cache most accessed static files
|
61
|
open_file_cache max=10000 inactive=10m;
|
62
|
open_file_cache_valid 2m;
|
63
|
open_file_cache_min_uses 1;
|
64
|
open_file_cache_errors on;
|
65
|
|
66
|
# virtual hosts includes
|
67
|
include "/etc/nginx/conf.d/*.conf";
|
68
|
}
|