-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathnginx.conf
82 lines (67 loc) · 1.74 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
user www www;
worker_processes auto;
worker_cpu_affinity auto;
pid /var/run/nginx.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
}
http {
server_tag "OpenCDN Beta 1.0";
server_tag off;
## Include types
include proxy_pass.conf;
include mime.types;
default_type application/octet-stream;
## Log Format
log_format access '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$upstream_cache_status"' &@&$host ;
log_format bandwidth '[$time_local] $host $body_bytes_sent $upstream_cache_status';
error_log /var/log/nginx_error.log;
## Size Limits
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
client_body_buffer_size 128k;
large_client_header_buffers 4 32k;
client_max_body_size 300M;
## Timeouts
keepalive_timeout 60;
## General Options
server_tokens off;
sendfile on;
fastcgi_intercept_errors on;
limit_conn_zone $binary_remote_addr zone=addr:10m;
## TCP Options
tcp_nopush on;
tcp_nodelay on;
## Compression
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 3;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
## lua code cache
lua_code_cache off;
lua_package_path "/usr/local/nginx/ocdn_lua/?.lua;;";
##No Header Allow
server {
listen 80 default;
server_name _;
include ocdn_lua.conf;
root /usr/local/opencdn/web;
location / {
index index.html;
}
##OpenCDN Status Monitor
location = /ocdn-status {
stub_status on;
access_log off;
}
location ~ /.ht {
deny all;
}
}
include /usr/local/nginx/conf/vhost/*.conf;
}