-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfancyfiles.conf
More file actions
58 lines (50 loc) · 1.33 KB
/
fancyfiles.conf
File metadata and controls
58 lines (50 loc) · 1.33 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
server {
listen 80;
listen [::]:80;
gzip on;
gzip_min_length 500;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript application/json text/xml text/css;
gzip_vary on;
root /usr/share/nginx/html;
index index.html index.htm;
error_page 404 /fancy/custom_404.html;
location = /custom_404.html {
root /usr/share/nginx/html;
internal;
}
location ~* \.(?:json)$ {
expires off;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
# access_log logs/static.log; # I don't usually include a static log
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location = /favicon.ico {
access_log off;
log_not_found off;
alias /fancy/favicon.ico;
}
location = /index.html {
alias /fancy/index.html;
}
location /fancy/ {
expires 1y;
access_log off;
add_header Cache-Control "public";
alias /fancy/;
}
location /vmx {
fancyindex on;
fancyindex_exact_size off;
fancyindex_localtime on;
fancyindex_header '/fancy/fancy-header.html';
fancyindex_footer '/fancy/fancy-footer.html';
fancyindex_css_href '/fancy/fancy.css';
charset utf-8;
}
}