forked from cloudwafs/DongTai-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
63 lines (53 loc) · 1.53 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
user root;
worker_processes auto;
pid /run/nginx.pid;
# daemon off;
events {
worker_connections 768;
# multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
client_max_body_size 100M;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
'$upstream_addr $upstream_response_time $request_time ';
# access_log access.log main;
include /etc/nginx/mime.types;
default_type application/octet-stream;
set_real_ip_from 172.16.0.0/12;
real_ip_header X-Real-Ip;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/dongtai.log main;
error_log /var/log/nginx/dongtai.log;
gzip on;
server{
listen 80;
server_name _;
set $flag 0;
#index index.html index.htm;
#root /usr/share/nginx/html/dongtai-doc/en/;
location / {
alias /usr/share/nginx/html/dongtai-doc/zh/;
index index.html index.htm;
autoindex on;
}
location /en {
alias /usr/share/nginx/html/dongtai-doc/en/;
index index.html index.htm;
autoindex on;
}
location /zh {
alias /usr/share/nginx/html/dongtai-doc/zh/;
index index.html index.htm;
autoindex on;
}
}
}