hide .git and .gitignore, and automatically fallback to index.html
This commit is contained in:
parent
26c72a37cc
commit
5068c088a2
1 changed files with 5 additions and 1 deletions
|
@ -35,9 +35,13 @@ server {
|
||||||
access_log /var/log/nginx/{{ item.from }}.log;
|
access_log /var/log/nginx/{{ item.from }}.log;
|
||||||
error_log /var/log/nginx/{{ item.from }}_error.log;
|
error_log /var/log/nginx/{{ item.from }}_error.log;
|
||||||
|
|
||||||
|
location ~ /\.git {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root {{ item.folder }};
|
root {{ item.folder }};
|
||||||
try_files $uri $uri.html 404;
|
try_files $uri $uri.html $uri/index.html 404;
|
||||||
}
|
}
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
|
|
Loading…
Reference in a new issue