-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
64 lines (53 loc) · 1.76 KB
/
nginx.conf
File metadata and controls
64 lines (53 loc) · 1.76 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
server {
listen 80;
server_name docs.basekick.net;
root /usr/share/nginx/html;
index index.html;
# Enable gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Assets directory (must come before catch-all)
location /assets/ {
try_files $uri =404;
}
# Images directory (must come before catch-all)
location /img/ {
try_files $uri =404;
}
# Arc OSS documentation - handle all /arc/* routes
location ~ ^/arc($|/) {
try_files $uri $uri/index.html $uri.html /arc/index.html /arc.html;
}
# Arc Enterprise documentation - handle all /arc-enterprise/* routes
location ~ ^/arc-enterprise($|/) {
try_files $uri $uri/index.html $uri.html /arc-enterprise/index.html /arc-enterprise.html;
}
# Memtrace documentation - handle all /memtrace/* routes
location ~ ^/memtrace($|/) {
try_files $uri $uri/index.html $uri.html /memtrace/index.html /memtrace.html;
}
# Liftbridge documentation - handle all /liftbridge/* routes
location ~ ^/liftbridge($|/) {
try_files $uri $uri/index.html $uri.html /liftbridge/index.html /liftbridge.html;
}
# Main site root
location = / {
try_files $uri /index.html;
}
# Default catch-all for other routes
location / {
try_files $uri $uri/index.html $uri.html /index.html;
}
# Custom 404 page
error_page 404 /404.html;
location = /404.html {
internal;
}
}