-
Notifications
You must be signed in to change notification settings - Fork 22
/
nginx.conf
41 lines (31 loc) · 874 Bytes
/
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
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
root /usr/share/nginx/html;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
charset utf-8;
location / {
index index.html;
try_files $uri $uri.html $uri/ =404;
add_header Cache-Control 'public, max-age=3600, s-maxage=60';
}
location /assets/ {
add_header Cache-Control 'public, immutable, max-age=31536000, stale-if-error=604800';
}
location = /service-worker.js {
add_header Cache-Control 'public, max-age=0, s-maxage=60, must-revalidate';
}
error_page 404 /404.html;
error_page 403 /404.html;
#error_page 500 502 503 504 /50x.html;
}
}