-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
46 lines (36 loc) · 1.21 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
log_format anonymous_log_format '$remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
error_log /var/log/nginx/error.log crit;
access_log /var/log/nginx/access.log anonymous_log_format;
server_tokens off;
location = / {
index /beratung-hilfe.html;
}
location / {
try_files $uri $uri/ /beratung-hilfe.html;
}
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
expires 1d;
access_log off;
}
location /releases {
try_files $uri =404;
}
# svg, fonts
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
add_header Access-Control-Allow-Origin "*";
expires 1d;
access_log off;
}
# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;
}