-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
73 lines (56 loc) · 1.74 KB
/
nginx.conf
File metadata and controls
73 lines (56 loc) · 1.74 KB
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
user nginx;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 10240;
events {
worker_connections 2048;
# multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 67;
types_hash_max_size 2048;
server_tokens off;
include mime.types;
default_type application/octet-stream;
log_format main
'$remote_addr - $remote_user [$time_local] '
'$request_time:$upstream_response_time '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;
set_real_ip_from 0.0.0.0/0;
real_ip_header X-Real-IP;
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 80 default_server;
server_name frontend _ "";
charset utf8;
location /healthcheck {
return 200 "OK\n";
access_log off;
}
location ~* \.(js|gif|png|jpg|jpeg|svg|eot|otf|ttf|woff|woff2|css)$ {
root /usr/share/nginx/html;
break;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
autoindex off;
try_files $uri $uri/ /index.html;
if ($request_filename ~* \.(?:html?)$) {
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
}
}
}