-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
41 lines (31 loc) · 1001 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
user root;
worker_processes 16;
events {
worker_connections 8192;
}
http {
include /etc/nginx/mime.types;
server {
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
listen 80;
server_name docs;
index index.html;
location / {
# content location
root /app/docs;
# exact matches -> reverse clean urls -> folders -> not found
try_files $uri $uri.html $uri/ =404;
# non existent pages
error_page 404 /404.html;
# a folder without index.html raises 403 in this setup
error_page 403 /404.html;
# adjust caching headers
# files in the assets folder have hashes filenames
location ~* /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
}
}