-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
65 lines (57 loc) · 1.98 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
user www www;
worker_processes 2;
worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;
error_log /home/wwwlogs/nginx_error.log crit;
pid /usr/local/nginx/logs/nginx.pid;
google_perftools_profiles /tmp/tcmalloc;
worker_rlimit_nofile 65535;
events {
use epoll;
worker_connections 65535;
}
http {
include mime.types;
default_type application/octet-stream;
#---------- Set request buffer ------------
server_names_hash_bucket_size 256;
large_client_header_buffers 4 256k;
client_header_buffer_size 512k;
client_body_buffer_size 512k;
client_max_body_size 300m;
client_body_timeout 120;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 90;
send_timeout 90;
#------------------------------------------
#---------- FastCGI settings --------------
fastcgi_connect_timeout 120;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 1024k;
fastcgi_buffers 32 1024k;
fastcgi_busy_buffers_size 2048k;
fastcgi_temp_file_write_size 2048k;
#------------------------------------------
#---------- Gzip settings -----------------
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
server_tokens off;
#------------------------------------------
log_format access '$scheme://$http_host$request_uri $remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server_name_in_redirect off;
server {
listen 80 default;
server_name _;
return 444;
}
include vhost/*.conf;
}