-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathnginx.conf
More file actions
56 lines (53 loc) · 1.24 KB
/
nginx.conf
File metadata and controls
56 lines (53 loc) · 1.24 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
server {
listen 80;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
etag on;
if_modified_since exact;
gzip off;
gzip_static on;
brotli on;
brotli_static on;
brotli_comp_level 5;
brotli_types
text/plain
text/css
text/xml
text/javascript
application/json
application/javascript
application/xml
application/rss+xml
image/svg+xml
application/vnd.ms-fontobject
font/ttf
font/otf
font/woff
font/woff2;
open_file_cache max=10000 inactive=1h;
open_file_cache_valid 10m;
open_file_cache_min_uses 2;
open_file_cache_errors on;
location /health {
return 200;
}
location ~* "^/assets/.+\.[0-9a-f]{7,}\.(?:css|js|mjs|map|json|svg|png|jpe?g|gif|webp|avif|ico|woff2?|ttf|otf|eot|xml|txt|csv|mp3|wav)$" {
root /var/www;
try_files $uri =404;
access_log off;
log_not_found off;
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable";
add_header Vary "Accept-Encoding" always;
}
location /assets {
root /var/www;
try_files $uri =404;
access_log off;
log_not_found off;
expires 1h;
add_header Cache-Control "public, max-age=3600, stale-while-revalidate=86400";
add_header Vary "Accept-Encoding" always;
}
}