-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.conf
34 lines (26 loc) · 894 Bytes
/
default.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
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;
charset utf-8;
client_max_body_size 25m;
location / {
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
proxy_cache off;
root /usr/share/nginx/html;
expires max;
try_files $uri @fallback;
}
}
location = /favicon.ico {
access_log off;
log_not_found off;
}
location ~ /\.ht {
deny all;
return 404;
}
error_page 401 403 404 /404.html;
error_log /var/log/nginx/localhost.error.log;
}