forked from binfalse/combinearchive.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
52 lines (42 loc) · 1.26 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
server {
listen 80;
server_name localhost;
add_header Content-Security-Policy "default-src 'self' data:; style-src 'self' 'unsafe-inline';";
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin";
rewrite ^/$ /index/ permanent;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
# cache js files for 1 year
location /scripts/ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public";
}
# cache fonts files for 1 year
location /fonts/ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public";
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location /.well-known/acme-challenge/ {
root /acme;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}